/* In-gen's editor palette: near-black slate, thin borders, cyan actions, the logo's violet as a glow. */
:root {
  --bg: #0d1117;
  --bg-2: #11161d;
  --panel: #161b22;
  --panel-2: #1c222b;
  --line: #262d38;
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #e6edf3;
  --muted: #9aa4b2;
  --cyan: #22d3ee;
  --cyan-ink: #04161b;
  --violet: #8b5cf6;
  --radius: 14px;
  --wrap: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(139, 92, 246, 0.16), transparent 62%),
    radial-gradient(700px 420px at -5% 10%, rgba(34, 211, 238, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

/* Top bar, like the editor's */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100% - var(--wrap)) / 2 + 16px));
  background: rgba(13, 17, 23, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.bar nav { display: flex; align-items: center; gap: 22px; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.bar nav a:hover { color: var(--text); }
.bar nav .bar-cta { color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.08); padding: 6px 14px; border-radius: 8px; font-weight: 600; }
.bar nav .bar-cta:hover { color: var(--text); background: rgba(34, 211, 238, 0.16); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Buttons: the editor's cyan Run button */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  background: var(--cyan); color: var(--cyan-ink);
  font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(34, 211, 238, 0.35); background: #3ddcf2; }
.button svg { width: 20px; height: 20px; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.button.ghost:hover { border-color: #3a4352; background: var(--panel); }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.meta { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.fine { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.lede { color: var(--muted); font-size: 18px; margin: 20px 0 28px; max-width: 36rem; }

/* Mission statement, the first thing on the page */
.nb { white-space: nowrap; }
.mission { text-align: center; max-width: 960px; margin: 0 auto; padding: 104px 0 88px; }
.mission .eyebrow { justify-content: center; }
.mission h1 { font-size: clamp(40px, 6.4vw, 78px); font-weight: 700; letter-spacing: -0.03em; }
.mission .lede { margin: 26px auto 0; max-width: 44rem; font-size: clamp(18px, 1.9vw, 21px); }
.tagline { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; margin: 40px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.01em; }
.tagline li { background: linear-gradient(100deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* The downloader: In-gen and its viewport */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 44px; padding: 40px 0 88px; border-top: 1px solid var(--line); }
h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 700; }
.hero h2 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; }
.download { display: flex; flex-wrap: wrap; gap: 12px; }
.download .button { padding: 13px 20px; }

/* The 3D viewport, framed like the editor's scene view */
.viewport { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, #121821, #0b0f15); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line-soft) inset; }
.viewport-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.viewport-bar .tab { color: var(--muted); padding: 4px 10px; border-radius: 7px; }
.viewport-bar .tab.active { color: var(--cyan); background: rgba(34, 211, 238, 0.1); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.45); }
.viewport-title { margin-left: auto; color: var(--muted); }
#hero-canvas { display: block; width: 100%; aspect-ratio: 4 / 3; opacity: 0; transition: opacity 0.8s ease; }
.viewport.ready #hero-canvas { opacity: 1; }
.viewport.no-webgl #hero-canvas { opacity: 1; background: center / cover url(/images/hero-poster.jpg); }
.viewport-chip { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(22, 27, 34, 0.9); border: 1px solid var(--line); font-size: 13px; color: var(--text); backdrop-filter: blur(6px); }
.spark { color: var(--cyan); }

/* Features: Harmony and friends */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 0 88px; }
.features article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.features article.lead { background: linear-gradient(140deg, rgba(139, 92, 246, 0.14), rgba(34, 211, 238, 0.05) 60%), var(--panel); }
.features .icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(34, 211, 238, 0.1); color: var(--cyan); margin-bottom: 16px; font-size: 19px; }
.features h2 { font-size: 22px; margin-bottom: 10px; }
.features p { margin: 0; color: var(--muted); font-size: 16px; }

/* Screens */
.section-title { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 10px; }
.section-lede { color: var(--muted); margin: 0 0 26px; max-width: 46rem; }
.screens { padding-bottom: 80px; }
.screen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.screen { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.screen.wide { grid-column: 1 / -1; }
.screen img { width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.screen figcaption { padding: 14px 18px; color: var(--muted); font-size: 15px; }
.screen figcaption strong { color: var(--text); }

/* Tech: what the engine is made of */
.tech, .tools { padding-bottom: 88px; }
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tech-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tech-grid h3 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.tech-grid h3 .icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(34, 211, 238, 0.1); color: var(--cyan); font-size: 15px; }
.tech-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tech-grid li { color: var(--muted); font-size: 15px; padding-left: 16px; position: relative; }
.tech-grid li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 2px; background: var(--cyan); opacity: 0.7; }
.tech-grid li strong { color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { font: 600 13px/1 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.chips li span { color: var(--cyan); }

/* Tools that come with In-gen */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tool-mark { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.tool-mark.blender { background: rgba(245, 121, 0, 0.14); color: #f59a3c; }
.tool-mark.kiln { background: rgba(139, 92, 246, 0.16); color: #b39bff; }
.tool h3 { font-size: 20px; margin-bottom: 6px; }
.tool p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.tool .link { font-weight: 600; text-decoration: none; }
.tool .link:hover { text-decoration: underline; }
.tools .fine { margin-top: 16px; }

/* Gen Haven band on the home page */
.haven-band { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--line); min-height: 380px; display: flex; align-items: center; }
.haven-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.haven-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 30, 0.92) 0%, rgba(10, 12, 30, 0.6) 45%, transparent 75%); }
.haven-band-text { position: relative; z-index: 1; padding: 40px; max-width: 30rem; }
.haven-band h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.haven-band p:not(.eyebrow) { color: #c8cde0; margin: 0 0 22px; }

footer { max-width: var(--wrap); margin: 64px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer p { margin: 0; }
footer nav { display: flex; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Gen Haven ---------- */
.haven h1, .haven h3, .haven-brand { font-family: Fraunces, Georgia, serif; letter-spacing: -0.01em; }
.haven-mark { color: #ffcf7a; font-size: 18px; }
.haven-hero { position: relative; margin-top: 24px; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--line); min-height: 440px; display: flex; align-items: flex-end; }
.haven-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; }
.haven-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 30, 0.85) 0%, rgba(10, 12, 30, 0.35) 50%, transparent 75%), linear-gradient(0deg, rgba(10, 12, 30, 0.6), transparent 45%); }
.haven-hero-text { position: relative; z-index: 1; padding: 44px; max-width: 34rem; }
.haven-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.haven-hero .lede { color: #cfd3e6; margin-bottom: 0; }
.games { padding-top: 40px; }
.game { display: grid; grid-template-columns: 1.3fr 1fr; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.game img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.game-text { padding: 30px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.game h3 { font-size: 30px; margin-bottom: 10px; }
.game-text > p:not(.eyebrow):not(.fine) { color: var(--muted); margin: 0 0 20px; }
.haven .button { background: #ffcf7a; color: #1d1405; box-shadow: 0 8px 28px rgba(255, 207, 122, 0.22); }
.haven .button:hover { background: #ffd98f; box-shadow: 0 12px 34px rgba(255, 207, 122, 0.32); }
.haven .eyebrow { color: #ffcf7a; }
.haven .bar nav .bar-cta { color: var(--cyan); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 32px; }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .game { grid-template-columns: 1fr; }
  .game img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .bar nav { gap: 14px; }
  .bar nav a:not(.bar-cta) { display: none; }
  .features, .screen-grid, .tech-grid { grid-template-columns: 1fr; }
  .mission { padding: 56px 0 52px; }
  .features article { padding: 22px; }
  .tool { grid-template-columns: 1fr; gap: 12px; }
  .download .button { width: 100%; }
  .viewport-chip { display: none; }
  .haven-band { min-height: 0; }
  .haven-band::after { background: linear-gradient(0deg, rgba(10, 12, 30, 0.95) 30%, rgba(10, 12, 30, 0.4)); }
  .haven-band-text { padding: 28px 20px; margin-top: 160px; }
  .haven-hero { min-height: 420px; }
  .haven-hero::after { background: linear-gradient(0deg, rgba(10, 12, 30, 0.94) 38%, rgba(10, 12, 30, 0.2) 80%); }
  .haven-hero-text { padding: 24px 20px; }
  .game-text { padding: 22px; }
}

/* ---------- Download, release page, Publisher ---------- */
.download { flex-direction: column; align-items: flex-start; gap: 0; }
.button.xl { padding: 18px 32px; font-size: 20px; font-weight: 700; border-radius: 12px; }
.button.xl svg { width: 24px; height: 24px; }
.download .button.xl { padding: 18px 32px; }
.download .meta { margin-top: 12px; }
.download .meta.free { margin-top: 4px; }
.download .button.ghost { margin-top: 22px; }
.release-hero .meta.free { margin-top: 12px; }
.badge { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 5px 10px; border-radius: 999px; font: 700 12px/1 Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #f4d58d; background: rgba(244, 213, 141, 0.12); border: 1px solid rgba(244, 213, 141, 0.4); }

.release { padding-top: 56px; }
.release-hero { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.release-hero h1 { font-size: clamp(34px, 5vw, 54px); }
.release-hero .download { margin-top: 26px; }
.release h2 { font-size: 24px; margin-bottom: 14px; }
.release h3 { font-size: 18px; margin: 26px 0 8px; }
.release-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; padding: 48px 0; }
.release-notes, .release-side section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.notes { color: var(--muted); }
.notes p, .notes ul, .notes ol { margin: 0 0 12px; }
.notes ul, .notes ol { padding-left: 22px; }
.notes li { margin-bottom: 6px; }
.notes h4 { color: var(--text); font-size: 16px; margin: 18px 0 8px; }
.notes code, .release code { font: 14px ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; color: var(--text); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.specs dt { color: var(--text); font-weight: 600; font-size: 15px; }
.specs dd { margin: 0; color: var(--muted); font-size: 15px; }
.release-install, .release-features { padding-bottom: 48px; }
.release-install p { color: var(--muted); max-width: 46rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; max-width: 52rem; }
.steps li { counter-increment: step; position: relative; padding: 14px 18px 14px 58px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 12px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(34, 211, 238, 0.12); color: var(--cyan); font-weight: 700; }
.steps strong { color: var(--text); }

.publisher { padding-bottom: 88px; }
.publisher-head { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; align-items: end; margin-bottom: 26px; }
.publisher-head .section-lede { margin: 0; }
.publisher-sub { margin: 4px 0 0; font-size: 19px; color: var(--text); }
.publisher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: cap; }
.publisher-grid li { counter-increment: cap; background: var(--panel); border: 1px dashed #344052; border-radius: var(--radius); padding: 22px; }
.publisher-grid li::before { content: counter(cap, decimal-leading-zero); display: block; font: 600 12px/1 ui-monospace, Consolas, monospace; color: var(--violet); margin-bottom: 12px; }
.publisher-grid h3 { font-size: 17px; margin-bottom: 8px; }
.publisher-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.publisher .fine { margin-top: 16px; }

.prose { max-width: 46rem; padding-top: 56px; }
.prose h2 { font-size: 22px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li strong { color: var(--text); }

/* ---------- Gen Haven player ---------- */
.player { padding-top: 18px; }
.player-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.player-head h1 { font-size: clamp(28px, 3vw, 36px); display: inline; margin-right: 14px; }
.player-head .eyebrow { margin-bottom: 4px; }
.player-head .meta { display: inline; margin: 0; }
.player .button { cursor: pointer; font-family: inherit; padding: 10px 18px; }
.stage { position: relative; width: 100%; height: max(420px, calc(100svh - 190px)); background: #05080c; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #0d120d; }
.stage iframe:fullscreen { border-radius: 0; }
.stage-note { margin-top: 10px; }
.stage-note .warn { color: #f4d58d; }
.player-info { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 16px; margin-top: 28px; }
.player-info article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.player-info h2 { font-size: 19px; margin-bottom: 12px; }
.player-info p { color: var(--muted); margin: 0 0 10px; }
.controls { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.controls dt { font: 600 13px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--text); }
.controls dd { margin: 0; color: var(--muted); }
.soon .badge { margin-left: 6px; font-size: 10px; }
.stars { font-size: 26px; letter-spacing: 4px; color: #3a4352; margin-bottom: 8px; }
.soon .button:disabled, .haven .soon .button:disabled { background: transparent; color: var(--muted); border: 1px dashed #3a4352; box-shadow: none; cursor: not-allowed; transform: none; margin: 6px 0 8px; }
/* The one ad: at least 150 px below the game's frame, outside it, never over anything. */
.ad-slot { margin-top: 150px; padding-top: 12px; border-top: 1px solid var(--line); min-height: 0; }
.ad-label { margin: 0 0 8px; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.ad-placeholder { display: grid; place-items: center; min-height: 100px; border: 1px dashed #3a4352; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-slot:has(ins.adsbygoogle:empty) .ad-label { visibility: hidden; } /* blocked or not loaded: no empty label */

@media (max-width: 960px) {
  .release-grid, .publisher-head { grid-template-columns: 1fr; }
  .publisher-grid { grid-template-columns: 1fr 1fr; }
  .player-info { grid-template-columns: 1fr 1fr; }
  .player-info .soon { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .publisher-grid, .player-info { grid-template-columns: 1fr; }
  .button.xl, .download .button.xl { width: 100%; padding: 16px 20px; font-size: 18px; }
  .stage { height: max(360px, calc(100svh - 230px)); }
  .release-notes, .release-side section { padding: 20px; }
  .steps li { padding-left: 52px; }
}
