:root {
    /* Bloombelt Solarpunk Palette — derived from the game's style bible */
    --bg-void: #08090c;
    --bg-panel: #0e1015;
    --bg-card: #14171e;
    --bg-membrane: #1a1e26;

    --ceramic: #E8E5DE;
    --ceramic-dim: rgba(232, 229, 222, 0.7);
    --text-muted: #6e7278;

    --sage: #9FB48F;
    --sage-dim: rgba(159, 180, 143, 0.12);
    --sage-glow: rgba(159, 180, 143, 0.25);

    --brass: #C9A45C;
    --brass-dim: rgba(201, 164, 92, 0.12);
    --brass-glow: rgba(201, 164, 92, 0.25);

    /* Typography — Bloombelt uses Inter/Space Grotesk/Space Mono */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-void);
    color: var(--ceramic);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* Subtle grain overlay — starfield dust */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--ceramic);
}

h4 {
    font-family: var(--font-heading);
    font-weight: 500;
}

a {
    color: var(--sage);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--brass);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--sage), var(--brass));
    margin: 0.8rem 0 3rem 0;
    border-radius: 1px;
    box-shadow: 0 0 12px var(--sage-dim);
}

.divider.centered {
    margin-left: auto;
    margin-right: auto;
}

/* ===================== HEADER ===================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(8,9,12,0.96), rgba(8,9,12,0));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(159, 180, 143, 0.06);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--ceramic);
    text-shadow: 0 0 20px var(--sage-dim);
    animation: logo-breathe 6s ease-in-out infinite alternate;
}

@keyframes logo-breathe {
    0% { text-shadow: 0 0 12px rgba(159, 180, 143, 0.05); }
    100% { text-shadow: 0 0 24px rgba(159, 180, 143, 0.15), 0 0 48px rgba(159, 180, 143, 0.04); }
}

nav a {
    margin-left: 1.8rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover {
    color: var(--sage);
    text-shadow: 0 0 8px var(--sage-dim);
}

.back-link {
    color: var(--brass) !important;
    border: 1px solid var(--brass-dim);
    padding: 0.35rem 0.9rem;
    border-radius: 3px;
    transition: all 0.3s ease !important;
}

.back-link:hover {
    border-color: var(--brass) !important;
    background: var(--brass-dim) !important;
    color: var(--ceramic) !important;
}

/* ===================== HERO ===================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 60%, var(--bg-panel) 0%, var(--bg-void) 70%);
}

/* Ambient sage glow — "fireflies not neon" */
.hero-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(159, 180, 143, 0.04) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow-breathe 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-glow-secondary {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 164, 92, 0.03) 0%, transparent 70%);
    animation: glow-breathe 10s ease-in-out infinite reverse;
    top: 55%;
    left: 55%;
}

@keyframes glow-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    padding: 0 2rem;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--ceramic) 40%, var(--sage) 70%, var(--brass) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: title-shimmer 8s ease-in-out infinite;
}

@keyframes title-shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.8;
}

/* ===================== BUTTONS ===================== */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: 1px solid;
    border-radius: 3px;
    cursor: pointer;
}

.btn-primary {
    background: transparent;
    border-color: var(--sage);
    color: var(--sage);
    animation: btn-sage-idle 5s ease-in-out infinite alternate;
}

.btn-primary:hover {
    animation: none;
    background: var(--sage-dim);
    border-color: var(--sage);
    color: var(--ceramic);
    box-shadow: 0 0 20px var(--sage-dim), inset 0 0 10px rgba(159, 180, 143, 0.08);
    text-shadow: 0 0 8px var(--sage-dim);
}

@keyframes btn-sage-idle {
    0% { border-color: rgba(159, 180, 143, 0.2); box-shadow: 0 0 5px rgba(159, 180, 143, 0.03) inset; }
    100% { border-color: rgba(159, 180, 143, 0.45); box-shadow: 0 0 10px rgba(159, 180, 143, 0.06) inset; }
}

.btn-secondary {
    background: rgba(14, 16, 21, 0.6);
    border-color: var(--brass);
    color: var(--brass);
}

.btn-secondary:hover {
    background: var(--brass-dim);
    box-shadow: 0 0 15px rgba(201, 164, 92, 0.1);
    color: var(--ceramic);
}

/* ===================== ABOUT ===================== */
.about-section {
    background: var(--bg-panel);
    border-top: 1px solid rgba(159, 180, 143, 0.06);
    border-bottom: 1px solid rgba(159, 180, 143, 0.06);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 15% 80%, rgba(159, 180, 143, 0.02) 0%, transparent 50%),
                radial-gradient(ellipse at 85% 20%, rgba(201, 164, 92, 0.015) 0%, transparent 50%);
    pointer-events: none;
}

.about-section h2 {
    font-size: 2.2rem;
    color: var(--sage);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ceramic-dim);
}

.about-text strong {
    color: var(--ceramic);
}

.about-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brass);
    margin-bottom: 0.6rem;
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stat cards (right column) */
.about-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(159, 180, 143, 0.06);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(159, 180, 143, 0.15);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--sage-dim);
    border: 1px solid rgba(159, 180, 143, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem auto;
    color: var(--sage);
}

.stat-card h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ceramic);
    font-weight: 700;
}

/* ===================== FEATURES ===================== */
.features-section {
    background: linear-gradient(to bottom, var(--bg-void), var(--bg-panel));
}

.features-section h2 {
    font-size: 2.2rem;
    text-align: center;
    color: var(--brass);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(159, 180, 143, 0.06);
    border-radius: 4px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--sage), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(159, 180, 143, 0.15);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(159, 180, 143, 0.03);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(159, 180, 143, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: var(--sage);
    background: var(--sage-dim);
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===================== SCREENSHOTS ===================== */
.screenshots-section {
    background: var(--bg-panel);
    border-top: 1px solid rgba(159, 180, 143, 0.06);
    border-bottom: 1px solid rgba(159, 180, 143, 0.06);
}

.screenshots-section h2 {
    font-size: 2.2rem;
    text-align: center;
    color: var(--sage);
}

.gallery-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.screenshot-placeholder {
    aspect-ratio: 16 / 10;
    background: var(--bg-card);
    border: 1px dashed rgba(159, 180, 143, 0.12);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.screenshot-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(159, 180, 143, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.screenshot-placeholder:hover {
    border-color: rgba(159, 180, 143, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.screenshot-placeholder.wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.placeholder-inner svg {
    opacity: 0.6;
}

.placeholder-inner span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===================== STATUS / NEWSLETTER ===================== */
.status-section {
    text-align: center;
    background: radial-gradient(circle at 50% 50%, var(--bg-membrane) 0%, var(--bg-void) 100%);
    padding: 6rem 2rem;
    border-top: 1px solid rgba(159, 180, 143, 0.06);
    position: relative;
    overflow: hidden;
}

.status-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(159, 180, 143, 0.025) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow-breathe 10s ease-in-out infinite;
    pointer-events: none;
}

.status-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--sage);
    position: relative;
}

.status-section p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    position: relative;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid rgba(159, 180, 143, 0.2);
    color: var(--sage);
    border-radius: 3px;
    position: relative;
    animation: badge-pulse 4s ease-in-out infinite;
    margin-bottom: 2rem;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(159, 180, 143, 0.05); border-color: rgba(159, 180, 143, 0.12); }
    50% { box-shadow: 0 0 18px rgba(159, 180, 143, 0.1); border-color: rgba(159, 180, 143, 0.3); }
}

/* Newsletter form */
.newsletter-wrapper {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.newsletter-form {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 54px;
    background: var(--bg-card);
    border: 1px solid rgba(159, 180, 143, 0.12);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-form:focus-within {
    border-color: rgba(159, 180, 143, 0.3);
    box-shadow: 0 0 20px rgba(159, 180, 143, 0.06), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    height: 100%;
    padding: 0 1.4rem;
    background-color: transparent;
    border: none;
    color: var(--ceramic);
    font-family: var(--font-body);
    font-size: 0.9rem;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
}

.newsletter-form input[type="email"]:-webkit-autofill,
.newsletter-form input[type="email"]:-webkit-autofill:hover,
.newsletter-form input[type="email"]:-webkit-autofill:focus,
.newsletter-form input[type="email"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--ceramic) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.newsletter-form button {
    height: 100%;
    border: none;
    border-left: 1px solid rgba(159, 180, 143, 0.1);
    border-radius: 0;
    margin: 0;
    padding: 0 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: rgba(159, 180, 143, 0.1);
    color: var(--sage);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: rgba(159, 180, 143, 0.18);
    color: var(--ceramic);
}

.newsletter-note {
    font-size: 0.75rem !important;
    color: #4a4e54 !important;
    margin-top: 0.8rem !important;
    margin-bottom: 0 !important;
    letter-spacing: 0.5px;
}

/* ===================== FOOTER ===================== */
footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid rgba(159, 180, 143, 0.06);
    font-size: 0.8rem;
    color: #3a3e44;
    background: var(--bg-void);
}

/* ===================== ANIMATIONS ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshot-placeholder.wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
    }

    nav a {
        margin: 0;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-visual {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

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

    .screenshot-placeholder.wide {
        grid-column: span 1;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        height: auto;
        border-radius: 6px;
    }

    .newsletter-form input[type="email"] {
        height: 48px;
        text-align: center;
    }

    .newsletter-form button {
        height: 48px;
        border-left: none;
        border-top: 1px solid rgba(159, 180, 143, 0.1);
    }

    .container {
        padding: 3rem 1.5rem;
    }

    .features-section h2,
    .screenshots-section h2,
    .about-section h2,
    .status-section h2 {
        font-size: 1.8rem;
    }
}
