/*
Theme Name: Blocksy Child
Template: blocksy
Version: 1.0.0
*/

/* =========================================================
   Heartfelt Games LLC - Global Design System
   ========================================================= */

:root {
    --hfg-bg: #111218;
    --hfg-bg-2: #171923;
    --hfg-panel: rgba(255, 255, 255, 0.055);
    --hfg-panel-strong: rgba(255, 255, 255, 0.09);
    --hfg-border: rgba(255, 255, 255, 0.12);
    --hfg-border-soft: rgba(255, 255, 255, 0.075);

    --hfg-text: #f5f1e8;
    --hfg-muted: #d9d3c7;
    --hfg-subtle: #a9a293;

    --hfg-accent: #ffcc66;
    --hfg-accent-2: #ff9f6e;
    --hfg-accent-soft: rgba(255, 204, 102, 0.16);

    --hfg-dark-text: #17130c;
    --hfg-radius: 24px;
    --hfg-radius-sm: 16px;
    --hfg-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --hfg-shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.24);
}

/* =========================================================
   Global Page Base
   ========================================================= */

html,
body {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(255, 204, 102, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(255, 120, 150, 0.10), transparent 30rem),
        var(--hfg-bg) !important;
    color: var(--hfg-text) !important;
}

body,
button,
input,
select,
textarea {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site,
.site-main,
#main,
#content,
.content-area,
.site-content,
.ct-container-full,
.ct-container,
[data-content="normal"],
[data-content="narrow"],
article,
.entry-content,
.hentry {
    background: transparent !important;
}

body,
p,
li,
.entry-content,
.wp-block-paragraph {
    color: var(--hfg-muted);
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.wp-block-heading {
    color: #ffffff;
    letter-spacing: -0.025em;
}

a {
    color: var(--hfg-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover,
a:focus {
    color: #ffe09b;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   Header / Navigation
   ========================================================= */

#masthead,
.site-header,
.ct-header,
.ct-header [data-row] {
    background: rgba(17, 18, 24, 0.96) !important;
    color: var(--hfg-text) !important;
    border-bottom: 1px solid var(--hfg-border-soft) !important;
}
.ct-header [data-row] {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.header-image,
.main-navigation,
#mainnav,
#site-navigation {
    background: rgba(17, 18, 24, 0.96) !important;
    color: var(--hfg-text) !important;
}

.ct-header a,
.site-header a,
.main-navigation a,
.menu a {
    color: var(--hfg-text) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.ct-header a:hover,
.site-header a:hover,
.main-navigation a:hover,
.menu a:hover {
    color: var(--hfg-accent) !important;
}

.ct-header .menu,
.ct-header .menu > li,
.ct-header nav ul,
.site-header nav ul {
    align-items: center;
}

.ct-header .menu > li > a,
.site-header .menu > li > a,
.main-navigation .menu > li > a {
    padding: 10px 12px;
    border-radius: 999px;
}

.ct-header .menu > li > a:hover,
.site-header .menu > li > a:hover,
.main-navigation .menu > li > a:hover {
    background: rgba(255, 255, 255, 0.07);
}

.site-header,
.ct-header {
    border-bottom: 1px solid var(--hfg-border-soft);
}

.site-header a,
.ct-header a,
.main-navigation a,
#mainnav a,
#site-navigation a,
.menu a,
.nav-menu a {
    color: var(--hfg-text) !important;
    font-weight: 700;
}

.site-header a:hover,
.ct-header a:hover,
.main-navigation a:hover,
#mainnav a:hover,
#site-navigation a:hover,
.menu a:hover,
.nav-menu a:hover {
    color: var(--hfg-accent) !important;
}

/* Hide duplicate text logo/site title while keeping image logo */
.site-title,
.site-description,
.ct-site-title,
.ct-site-description,
.site-branding .site-title,
.site-branding .site-description {
    display: none !important;
}

/* Slightly tone down bright logo against dark site */
.site-branding img,
.custom-logo,
.site-logo-container img,
.ct-logo img {
    filter: saturate(0.85) brightness(0.92);
}

.site-branding,
.site-title,
.site-description {
    color: var(--hfg-text) !important;
}

.site-title a {
    color: #ffffff !important;
}

.custom-logo,
.site-logo img,
.site-branding img,
.header-image img {
    max-height: 96px;
    width: auto;
}

/* Logo sizing */
.ct-header .custom-logo,
.site-header .custom-logo,
.site-branding img,
.ct-logo img {
    max-height: 76px;
    width: auto;
}

/* Mobile header cleanup */
@media (max-width: 900px) {
    .ct-header .custom-logo,
    .site-header .custom-logo,
    .site-branding img,
    .ct-logo img {
        max-height: 58px;
    }

/* =========================================================
   Footer
   ========================================================= */

#colophon,
.site-footer,
.ct-footer,
footer {
    background: #0c0d12 !important;
    color: var(--hfg-muted) !important;
    border-top: 1px solid var(--hfg-border);
}

#colophon a,
.site-footer a,
.ct-footer a,
footer a {
    color: var(--hfg-accent) !important;
}

/* =========================================================
   Generic WordPress Content Styling
   ========================================================= */

body.home .site-main,
body.blog .site-main,
body.archive .site-main,
body.page .site-main,
body.single .site-main {
    width: min(1280px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
    padding: 56px 0 88px;
}

body.home article,
body.blog article,
body.archive article,
body:not(.single-games) .hentry {
    margin: 0 0 34px;
    padding: 32px;
    border-radius: var(--hfg-radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025)),
        rgba(20, 22, 30, 0.86) !important;
    border: 1px solid var(--hfg-border);
    box-shadow: var(--hfg-shadow-soft);
}

body.home article .entry-title,
body.blog article .entry-title,
body.archive article .entry-title,
body.home article h1,
body.blog article h1,
body.archive article h1 {
    margin-top: 0;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.12;
}

body.home article .entry-title a,
body.blog article .entry-title a,
body.archive article .entry-title a {
    color: #ffffff !important;
    text-decoration: none;
}

body.home article .entry-title a:hover,
body.blog article .entry-title a:hover,
body.archive article .entry-title a:hover {
    color: var(--hfg-accent) !important;
}

.entry-meta,
.entry-footer,
.posted-on,
.byline,
.comments-link,
.cat-links,
.tags-links {
    color: var(--hfg-subtle) !important;
    font-size: 0.9rem;
}

.entry-meta a,
.entry-footer a,
.posted-on a,
.byline a {
    color: var(--hfg-accent) !important;
}

body.home article img,
body.blog article img,
body.archive article img,
.entry-content img,
.wp-block-image img {
    border-radius: var(--hfg-radius-sm);
    border: 1px solid var(--hfg-border-soft);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.posts-navigation,
.post-navigation,
.navigation {
    margin: 48px 0;
    padding: 24px;
    border-radius: var(--hfg-radius);
    background: var(--hfg-panel);
    border: 1px solid var(--hfg-border-soft);
}

.posts-navigation a,
.post-navigation a,
.navigation a {
    color: var(--hfg-accent) !important;
    font-weight: 800;
}

.widget,
.widget-area section {
    padding: 24px;
    margin-bottom: 24px;
    border-radius: var(--hfg-radius);
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid var(--hfg-border-soft);
    color: var(--hfg-muted);
}

.widget-title,
.widget h2,
.widget h3 {
    color: #ffffff;
    margin-top: 0;
}

.widget a {
    color: var(--hfg-accent) !important;
}

/* =========================================================
   Gutenberg / Homepage Builder Helpers
   ========================================================= */

.wp-block-group,
.wp-block-columns,
.wp-block-cover {
    box-sizing: border-box;
}

.wp-block-cover {
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--hfg-border);
    box-shadow: var(--hfg-shadow);
}

.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3,
.wp-block-cover p {
    color: #ffffff !important;
}

.wp-block-columns {
    gap: 28px;
}

.wp-block-column {
    min-width: 0;
}

.hfg-card,
.wp-block-column > .wp-block-group {
    height: 100%;
    padding: 28px;
    border-radius: var(--hfg-radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
        rgba(20, 22, 30, 0.86);
    border: 1px solid var(--hfg-border);
    box-shadow: var(--hfg-shadow-soft);
}

.hfg-home-cta {
    text-align: center;
    padding: 56px 30px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top, rgba(255, 204, 102, 0.16), transparent 26rem),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        rgba(21, 22, 31, 0.95);
    border: 1px solid var(--hfg-border);
    box-shadow: var(--hfg-shadow);
}

.wp-block-button__link,
button,
input[type="submit"],
.hfg-button {
    border-radius: 999px !important;
    font-weight: 800;
}

.wp-block-button__link {
    background: linear-gradient(135deg, var(--hfg-accent), var(--hfg-accent-2)) !important;
    color: var(--hfg-dark-text) !important;
    border: 0 !important;
    box-shadow: 0 10px 28px rgba(255, 174, 88, 0.20);
    text-decoration: none !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background: rgba(255, 255, 255, 0.065) !important;
    color: var(--hfg-text) !important;
    border: 1px solid var(--hfg-border) !important;
    box-shadow: none;
}

/* =========================================================
   Forms / Search
   ========================================================= */

input,
textarea,
select {
    background: rgba(255, 255, 255, 0.075) !important;
    color: var(--hfg-text) !important;
    border: 1px solid var(--hfg-border) !important;
    border-radius: 10px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--hfg-accent) !important;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--hfg-subtle);
}

/* =========================================================
   Games CPT Page Styling
   ========================================================= */

body.single-games {
    background:
        radial-gradient(circle at top left, rgba(255, 204, 102, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(255, 120, 150, 0.10), transparent 28rem),
        var(--hfg-bg) !important;
}

/* Remove Blocksy/default single post title/header on game pages */
body.single-games .entry-header,
body.single-games .hero-section,
body.single-games .page-title,
body.single-games .ct-title-label,
body.single-games .ct-page-title,
body.single-games .post-title,
body.single-games article > header,
body.single-games .site-main > header,
body.single-games [class*="page-title"],
body.single-games [class*="hero-section"] {
    display: none !important;
}

/* Stop Blocksy/global single width from constraining custom template */
body.single-games .site-main {
    background: transparent !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.single-games .entry-content {
    color: var(--hfg-text);
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hfg-game-page {
    width: min(1280px, calc(100% - 48px));
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 56px 0 88px;
}

.hfg-game-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 40px;
    align-items: center;
    margin-bottom: 72px;
    padding: 34px;
    border: 1px solid var(--hfg-border);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        rgba(20, 22, 30, 0.92);
    box-shadow: var(--hfg-shadow);
}

.hfg-game-hero-text {
    min-width: 0;
}

.hfg-game-status {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--hfg-accent-soft);
    color: #ffdd8a;
    border: 1px solid rgba(255, 204, 102, 0.28);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Smaller game page title */
body.single-games .hfg-game-page .hfg-game-hero h1 {
    margin: 0 0 16px !important;
    font-size: clamp(1.9rem, 3vw, 3rem) !important;
    line-height: 1.1 !important;
    color: #ffffff !important;
    letter-spacing: -0.025em !important;
    max-width: 820px;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
}

.hfg-game-description {
    max-width: 760px;
    color: var(--hfg-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.hfg-game-description p {
    margin-top: 0;
}

.hfg-game-hero-image img {
    width: 100%;
    max-width: 480px;
    height: auto;
    display: block;
    border-radius: 20px;
    margin-left: auto;
    border: 1px solid var(--hfg-border);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

.hfg-game-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hfg-centered-buttons {
    justify-content: center;
}

.hfg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid var(--hfg-border);
    background: rgba(255, 255, 255, 0.065);
    color: var(--hfg-text) !important;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none !important;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.hfg-button:hover,
.hfg-button:focus {
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.32);
}

.hfg-button-primary {
    background: linear-gradient(135deg, var(--hfg-accent), var(--hfg-accent-2));
    color: var(--hfg-dark-text) !important;
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(255, 174, 88, 0.22);
}

.hfg-button-primary:hover,
.hfg-button-primary:focus {
    color: var(--hfg-dark-text) !important;
    background: linear-gradient(135deg, #ffe09b, #ffb084);
}

.hfg-section {
    margin: 72px 0;
}

/* Smaller game section headers */
body.single-games .hfg-game-page .hfg-section h2 {
    margin: 0 0 22px !important;
    font-size: clamp(1.45rem, 2vw, 1.95rem) !important;
    line-height: 1.16 !important;
    color: #fff7df !important;
    letter-spacing: -0.018em;
}

.hfg-trailer-section,
.hfg-store-section,
.hfg-features-section {
    padding: 32px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
        rgba(12, 13, 18, 0.72);
    border: 1px solid var(--hfg-border-soft);
}

.hfg-video {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.hfg-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--hfg-border);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
}

.hfg-store-embeds {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 28px;
    align-items: center;
}

.hfg-store-embed {
    width: 100%;
    overflow: hidden;
    padding: 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--hfg-border-soft);
}

.hfg-store-embed iframe {
    max-width: 100%;
    display: block;
    border-radius: 10px;
}

.hfg-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.hfg-screenshot-grid a {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--hfg-border-soft);
    box-shadow: var(--hfg-shadow-soft);
}

.hfg-screenshot-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.15s ease;
}

.hfg-screenshot-grid a:hover img {
    transform: scale(1.015);
}

.hfg-feature-list {
    columns: 2;
    column-gap: 54px;
    margin: 0;
    padding-left: 1.25rem;
    color: #e8e0d3;
    font-size: 1rem;
    line-height: 1.78;
}

.hfg-feature-list li {
    break-inside: avoid;
    margin-bottom: 9px;
    padding-left: 4px;
    list-style-position: outside;
}

.hfg-feature-list li::marker {
    color: var(--hfg-accent);
}

.hfg-final-cta {
    text-align: center;
    padding: 54px 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(255, 204, 102, 0.16), transparent 26rem),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        rgba(21, 22, 31, 0.95);
    border: 1px solid var(--hfg-border);
    box-shadow: var(--hfg-shadow);
}

.hfg-final-cta h2 {
    color: #ffffff;
}

.hfg-final-cta p {
    max-width: 660px;
    margin: 0 auto;
    color: var(--hfg-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* =========================================================
   Utility Fixes
   ========================================================= */

hr,
.wp-block-separator {
    border-color: var(--hfg-border);
    opacity: 1;
}

iframe {
    max-width: 100%;
}

body.single-games .no-results,
body.single-games .not-found {
    display: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    body.home .site-main,
    body.blog .site-main,
    body.archive .site-main,
    body.page .site-main,
    body.single .site-main {
        width: min(100% - 28px, 1280px);
        padding: 36px 0 64px;
    }

    body.home article,
    body.blog article,
    body.archive article,
    body:not(.single-games) .hentry {
        padding: 24px;
        border-radius: 22px;
    }

    .hfg-game-page {
        width: min(100% - 28px, 1280px);
        padding-top: 36px;
        padding-bottom: 64px;
    }

    .hfg-game-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 26px;
        margin-bottom: 58px;
        border-radius: 24px;
    }

    body.single-games .hfg-game-page .hfg-game-hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.45rem) !important;
        line-height: 1.12 !important;
    }

    body.single-games .hfg-game-page .hfg-section h2 {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
    }

    .hfg-game-hero-image img {
        max-width: 100%;
        margin-left: 0;
    }

    .hfg-store-embeds {
        grid-template-columns: 1fr;
    }

    .hfg-screenshot-grid {
        grid-template-columns: 1fr;
    }

    .hfg-feature-list {
        columns: 1;
    }

    .hfg-trailer-section,
    .hfg-store-section,
    .hfg-features-section {
        padding: 26px;
    }
}

@media (max-width: 520px) {
    body.home .site-main,
    body.blog .site-main,
    body.archive .site-main,
    body.page .site-main,
    body.single .site-main,
    .hfg-game-page {
        width: min(100% - 20px, 1280px);
    }

    .hfg-game-hero {
        padding: 22px;
        border-radius: 22px;
    }

    body.single-games .hfg-game-page .hfg-game-hero h1 {
        font-size: clamp(1.55rem, 8vw, 2.1rem) !important;
    }

    .hfg-game-buttons {
        flex-direction: column;
    }

    .hfg-button {
        width: 100%;
    }

    .hfg-final-cta {
        padding: 42px 22px;
    }

    .hfg-store-embed {
        padding: 10px;
    }
}