:root {
    --bg: #12100f;
    --surface: #1b1816;
    --surface-2: #24201d;
    --paper: #f4ead8;
    --paper-2: #ded0ba;
    --ink: #241f1b;
    --text: #f5eddf;
    --muted: #b8aa98;
    --accent: #d85d3f;
    --accent-dark: #9f3e2a;
    --gold: #d7a44f;
    --border: rgba(244, 234, 216, 0.16);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --radius: 18px;
    --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; }
code { color: var(--gold); }
.shell { width: min(calc(100% - 2rem), var(--shell)); margin-inline: auto; }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--paper); color: var(--ink); padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(18, 16, 15, .92);
    backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand span { display: grid; line-height: 1; }
.brand strong { letter-spacing: .08em; text-transform: uppercase; }
.brand small { color: var(--muted); margin-top: .2rem; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav { display: flex; gap: .3rem; }
.primary-nav a { color: var(--muted); text-decoration: none; padding: .55rem .7rem; border-radius: 999px; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .55rem .8rem; }

.hero { padding: 6rem 0 5rem; background: radial-gradient(circle at 78% 28%, rgba(216, 93, 63, .18), transparent 30%), linear-gradient(180deg, #171310, var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3.5rem; }
.hero h1, .page-hero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.02; letter-spacing: -.035em; margin: .4rem 0 1.2rem; }
.hero h1 { font-size: clamp(3.1rem, 7vw, 6.2rem); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; margin: 0 0 .5rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--paper-2); max-width: 720px; }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .75rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--border); background: var(--surface); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--muted); font-size: .9rem; }
.hero-meta span { padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 999px; }

.editor-card { border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: #0d0d0f; transform: rotate(1deg); }
.editor-topbar { height: 34px; display: flex; align-items: center; gap: .4rem; padding: 0 .7rem; background: #202024; border-bottom: 1px solid #333; }
.editor-topbar span { width: 10px; height: 10px; border-radius: 50%; background: #777; }
.editor-body { min-height: 360px; display: grid; grid-template-columns: 105px 1fr 115px; }
.editor-body aside { display: flex; flex-direction: column; gap: .65rem; padding: .8rem; color: #b8b8c1; background: #19191d; font-size: .68rem; }
.editor-body aside strong { color: #f2f2f5; }
.editor-stage { padding: 1rem; display: grid; place-items: center; background-color: #25252b; background-image: linear-gradient(#303038 1px, transparent 1px), linear-gradient(90deg, #303038 1px, transparent 1px); background-size: 18px 18px; }
.pixel-room { width: 190px; height: 190px; position: relative; background: #92735b; border: 16px solid #4c3f35; box-shadow: inset 0 0 0 8px #c39a6f; image-rendering: pixelated; }
.pixel-player, .pixel-npc { position: absolute; width: 24px; height: 36px; bottom: 46px; background: #dbd0bc; box-shadow: inset 0 -12px #477a70, 0 4px 0 rgba(0,0,0,.25); }
.pixel-player { left: 48px; }
.pixel-npc { right: 42px; background: #e0c0a2; box-shadow: inset 0 -12px #7a4b55, 0 4px 0 rgba(0,0,0,.25); }

.section { padding: 5rem 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.12; margin: .3rem 0 1.5rem; }
.feature-grid { display: grid; gap: 1rem; }
.feature-grid.three { grid-template-columns: repeat(3, 1fr); }
.feature-grid.two, .content-grid { grid-template-columns: repeat(2, 1fr); }
.feature-card, .content-grid article, .post-card, .release-card, .price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.feature-card h2, .feature-card h3, .content-grid h2, .post-card h2, .post-card h3, .release-card h2, .release-card h3 { font-family: Georgia, "Times New Roman", serif; margin-top: 0; }
.feature-card p, .content-grid p, .post-card p, .release-card p, .price-card p { color: var(--muted); }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.text-link { color: var(--gold); text-decoration: none; font-weight: 700; }
.roadmap-grid, .post-grid, .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.roadmap-grid { grid-template-columns: repeat(2, 1fr); }
.release-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.version { color: var(--gold); font-weight: 800; letter-spacing: .08em; }
.status { display: inline-flex; width: fit-content; padding: .28rem .58rem; border: 1px solid var(--border); border-radius: 999px; color: var(--paper-2); font-size: .76rem; }
.status-in-development { color: #f4bd66; }
.status-complete { color: #8fd2ac; }
.post-meta { color: var(--gold) !important; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.post-card a { text-decoration: none; }
.post-card a:hover { color: var(--gold); }
.cta-section { padding: 1rem 0 6rem; }
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem; border-radius: 24px; color: var(--ink); background: var(--paper); }
.cta-panel .eyebrow { color: var(--accent-dark); }
.cta-panel h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.3rem); margin: .2rem 0; }
.cta-panel p { max-width: 760px; }

.page-hero { padding: 5rem 0 3rem; background: linear-gradient(180deg, #171310, var(--bg)); }
.content-grid { display: grid; gap: 1rem; }
.timeline { position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-left: 3rem; margin-bottom: 1.2rem; }
.timeline-marker { position: absolute; left: 2px; top: 28px; width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--bg); background: var(--accent); }
.clean-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem 1rem; padding-left: 1.2rem; color: var(--paper-2); }
.post-list { display: grid; gap: 1rem; max-width: 900px; }
.post-card.wide { padding: 1.8rem; }
.article-shell { max-width: 780px; }
.article-shell h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1.05; }
.article-shell section { margin: 3rem 0; }
.article-shell h2 { font-size: 2rem; }
.article-shell p, .article-shell li { color: var(--paper-2); }
.price-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: 2.8rem; margin: .8rem 0; }
.price-card.featured { background: var(--paper); color: var(--ink); transform: translateY(-10px); }
.price-card.featured p { color: #62564b; }
.disclaimer { color: var(--muted); margin-top: 1.5rem; }

.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 1.2rem; background: #0c0b0a; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; }
.footer-brand { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }

@media (max-width: 850px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav { display: none; position: absolute; top: 64px; right: 1rem; flex-direction: column; min-width: 190px; padding: .7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
    .primary-nav.open { display: flex; }
    .hero-grid { grid-template-columns: 1fr; }
    .feature-grid.three, .feature-grid.two, .content-grid, .pricing-grid { grid-template-columns: 1fr; }
    .roadmap-grid { grid-template-columns: 1fr; }
    .price-card.featured { transform: none; }
}

@media (max-width: 620px) {
    .hero { padding-top: 4rem; }
    .editor-body { grid-template-columns: 76px 1fr 78px; }
    .editor-body aside { padding: .5rem; font-size: .55rem; }
    .pixel-room { width: 140px; height: 140px; }
    .split-heading, .cta-panel, .footer-grid, .footer-bottom { align-items: flex-start; flex-direction: column; }
    .clean-list { grid-template-columns: 1fr; }
}

.devlog-hero-image {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    margin: 2rem 0 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Authoring pass additions */
.announcement-bar { padding: .55rem 1rem; text-align: center; color: var(--paper); background: var(--accent-dark); font-size: .9rem; }
.announcement-bar a { text-decoration: none; font-weight: 700; }
.hero-media { margin: 0; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.hero-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.docs-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.docs-category-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.docs-category-card h2 { margin: 0 0 .4rem; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.docs-category-card > p { color: var(--muted); }
.docs-link-list { display: grid; gap: .7rem; margin-top: 1.2rem; }
.docs-link-list a { display: grid; gap: .2rem; padding: .9rem; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; background: var(--surface-2); }
.docs-link-list a:hover { border-color: rgba(216, 93, 63, .65); }
.docs-link-list span, .docs-link-list small { color: var(--muted); }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; padding-top: 4rem; padding-bottom: 6rem; }
.docs-sidebar { position: sticky; top: 100px; align-self: start; display: grid; gap: 1.4rem; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 1rem; }
.docs-home-link { color: var(--gold); text-decoration: none; font-weight: 700; }
.docs-nav-group { display: grid; gap: .3rem; }
.docs-nav-group strong { margin-bottom: .35rem; font-size: .83rem; text-transform: uppercase; letter-spacing: .1em; }
.docs-nav-group a { color: var(--muted); padding: .35rem .5rem; border-radius: 8px; text-decoration: none; }
.docs-nav-group a:hover, .docs-nav-group a.active { color: var(--text); background: var(--surface-2); }
.docs-article { min-width: 0; max-width: 850px; }
.docs-article header { padding-bottom: 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.2rem; }
.docs-article h1 { margin: .4rem 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 6vw, 4.8rem); font-weight: 500; line-height: 1.04; }
.doc-block { margin: 2.2rem 0; }
.doc-block h2, .doc-image h2 { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.doc-block p, .doc-block li { color: var(--paper-2); }
.doc-block li + li { margin-top: .45rem; }
.doc-block pre { overflow-x: auto; padding: 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: #090807; }
.doc-block pre code { color: #f0ddbd; white-space: pre; }
.doc-image { margin: 2.3rem 0; }
.doc-image img { display: block; width: 100%; border: 1px solid var(--border); border-radius: 16px; }
.doc-image figcaption { color: var(--muted); margin-top: .7rem; }
.doc-callout { margin: 2rem 0; padding: 1rem 1.1rem; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 12px; background: var(--surface); }
.doc-callout p { margin: .35rem 0 0; color: var(--paper-2); }
.callout-warning { border-left-color: var(--accent); }
.callout-note { border-left-color: #7aa7c7; }
.docs-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.docs-pager a { color: var(--gold); text-decoration: none; }
@media (max-width: 820px) {
    .docs-index-grid { grid-template-columns: 1fr; }
    .docs-layout { grid-template-columns: 1fr; gap: 2rem; }
    .docs-sidebar { position: static; max-height: none; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; }
}
