/* =========================================================
   Minecraft Game CMS — Frontend Stylesheet
   Modern, clean layout with blocky "voxel" game accents
   ========================================================= */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --ink: #161922;
    --muted: #6b7280;
    --border: #e6e9f0;

    --green: #57b23f;
    --green-dark: #3f8e2e;
    --blue: #3e8ede;
    --gold: #f3b73d;

    --dark: #171a22;
    --dark-soft: #21252f;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(20, 24, 35, 0.07);
    --shadow-lg: 0 20px 50px rgba(20, 24, 35, 0.16);

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-pixel: 'Press Start 2P', cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--muted); }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Pixel accent helpers ---------- */
.pixel-eyebrow {
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-dark);
    background: rgba(87, 178, 63, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.pixel-eyebrow::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--green);
    box-shadow:
        12px 0 0 var(--gold),
        24px 0 0 var(--blue);
    flex-shrink: 0;
}
.pixel-eyebrow.on-dark {
    background: rgba(255,255,255,0.08);
    color: #d6f5cd;
}

.voxel-cluster {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(3, 14px);
    grid-template-rows: repeat(3, 14px);
    gap: 4px;
    opacity: 0.5;
    pointer-events: none;
}
.voxel-cluster span {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}
.voxel-cluster span:nth-child(1) { background: var(--green); }
.voxel-cluster span:nth-child(2) { background: transparent; }
.voxel-cluster span:nth-child(3) { background: var(--gold); }
.voxel-cluster span:nth-child(4) { background: transparent; }
.voxel-cluster span:nth-child(5) { background: var(--blue); }
.voxel-cluster span:nth-child(6) { background: transparent; }
.voxel-cluster span:nth-child(7) { background: var(--gold); }
.voxel-cluster span:nth-child(8) { background: transparent; }
.voxel-cluster span:nth-child(9) { background: var(--green); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    text-align: center;
}
.btn-primary {
    background: var(--green);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(87, 178, 63, 0.35);
}
.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(87, 178, 63, 0.45);
}
.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover {
    border-color: #ffffff;
    transform: translateY(-2px);
}
.btn-dark {
    background: var(--dark);
    color: #fff;
}
.btn-dark:hover { background: var(--dark-soft); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--ink);
}
.site-logo img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    position: relative;
    padding: 6px 0;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 3px;
    background: var(--green);
    border-radius: 2px;
    transition: width .2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--green-dark); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px; height: 3px;
    background: var(--ink);
    border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    color: #fff;
    padding: 90px 0 100px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    filter: saturate(1.1);
}
.hero-bg-image { /* set inline via style attr */ }
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(23,26,34,0.95) 30%, rgba(23,26,34,0.55) 100%);
}
.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
}
.hero-icon {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 26px;
    border: 3px solid rgba(255,255,255,0.15);
}
.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    margin-bottom: 18px;
}
.hero .tagline {
    font-size: 19px;
    color: #d3d6e0;
    max-width: 480px;
    margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual {
    position: relative;
}
.hero-visual .voxel-cluster {
    top: -30px;
    right: -10px;
}
.hero-visual img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.12);
}

/* ---------- Section heading ---------- */
.section { padding: 90px 0; }
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { font-size: 17px; }
.section-alt { background: var(--surface); }

/* ---------- Features (zig-zag) ---------- */
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 90px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-media { order: 2; }
.feature-row.reverse .feature-text { order: 1; }
.feature-media {
    position: relative;
}
.feature-media img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}
.feature-media .voxel-cluster {
    bottom: -20px;
    left: -20px;
}
.feature-row.reverse .feature-media .voxel-cluster {
    left: auto;
    right: -20px;
}
.feature-text .pixel-eyebrow { margin-bottom: 14px; }
.feature-text h3 { font-size: 28px; margin-bottom: 14px; }
.feature-text p { font-size: 16px; }

/* ---------- App content / about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.about-text { max-width: 720px; margin: 0 auto; text-align: center; }
.about-text h2 { font-size: clamp(28px, 4vw, 38px); }
.screenshot-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
}
.screenshot-strip img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    aspect-ratio: 9/16;
    object-fit: cover;
    width: 100%;
    transition: transform .25s ease;
}
.screenshot-strip img:hover { transform: translateY(-6px); }

/* ---------- Platforms ---------- */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.platform-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.platform-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.platform-icon {
    width: 60px; height: 60px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--blue));
}
.platform-icon img { width: 32px; height: 32px; filter: brightness(0) invert(1); }
.platform-card h3 { font-size: 20px; margin-bottom: 8px; }
.platform-card p { font-size: 14px; margin-bottom: 22px; }

/* ---------- New game block ---------- */
.newgame-section { padding: 90px 0; }
.newgame-card {
    position: relative;
    background: linear-gradient(120deg, var(--dark) 45%, var(--dark-soft) 100%);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.newgame-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(243,183,61,0.18), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(87,178,63,0.18), transparent 45%);
}
.newgame-text { padding: 60px; position: relative; z-index: 2; }
.newgame-badge {
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 2px;
    background: var(--gold);
    color: #2b1d00;
    padding: 8px 14px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 20px;
}
.newgame-text h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }
.newgame-text p { color: #c9cdd8; font-size: 16px; margin-bottom: 30px; }
.newgame-media { position: relative; height: 100%; min-height: 360px; }
.newgame-media img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* ---------- Blog ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.blog-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.blog-card-body { padding: 24px; }
.blog-date {
    font-family: var(--font-pixel);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--green-dark);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
}
.blog-card h3 { font-size: 19px; margin-bottom: 10px; }
.blog-card p { font-size: 14px; }
.blog-read-more { font-weight: 700; color: var(--green-dark); font-size: 14px; }

.post-header { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.post-header .blog-date { margin-bottom: 14px; }
.post-header h1 { font-size: clamp(30px, 5vw, 46px); }
.post-cover {
    width: 100%;
    max-width: 920px;
    margin: 0 auto 50px;
    border-radius: var(--radius);
    aspect-ratio: 16/8;
    object-fit: cover;
    box-shadow: var(--shadow);
}
.post-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
}
.post-content h2 { margin-top: 1.6em; }
.post-content img { border-radius: var(--radius-sm); margin: 20px 0; }
.post-content p { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: #aeb3c2;
    padding: 60px 0 30px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 14px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 8px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; font-family: var(--font-display); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: #aeb3c2; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    padding-top: 24px;
    font-size: 13px;
    text-align: center;
    color: #6c7283;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero .container { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero .tagline { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-icon { margin-left: auto; margin-right: auto; }
    .feature-row { grid-template-columns: 1fr; gap: 30px; }
    .feature-row.reverse .feature-media,
    .feature-row.reverse .feature-text { order: initial; }
    .platforms-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .screenshot-strip { grid-template-columns: repeat(2, 1fr); }
    .newgame-card { grid-template-columns: 1fr; }
    .newgame-media { min-height: 260px; order: -1; }
}
@media (max-width: 720px) {
    .main-nav { position: fixed; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--border); transform: translateY(-110%); transition: transform .25s ease; }
    .main-nav.open { transform: translateY(0); }
    .nav-toggle { display: flex; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .screenshot-strip { grid-template-columns: repeat(2, 1fr); }
    .newgame-text { padding: 40px 28px; }
}
