/* SuiteCore hub. One layout for every page; the Blossom/Mystic toggle swaps the tokens below via
   data-suite on <html>. Palettes match the original blossomsuite.org / mysticsuite.org sites and
   the in-game dark plum UI (docs/UI_STYLE.md in the BlossomSuite repo). */

@font-face { font-family: Minecrafter; src: url('/fonts/Minecrafter.Alt.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: SuitePixel; src: url('/fonts/Silkscreen-Regular.ttf') format('truetype'); font-display: swap; }

/* ---------- Palettes ---------- */

:root,
:root[data-suite="blossom"] {
  --brand: #9B6BFF;
  --brand-highlight: #D9BFFF;
  --brand-deep: #7149BE;
  --brand-soft: #3E2459;
  --brand-rgb: 155 107 255;
  --highlight-rgb: 217 191 255;
  --support-rgb: 77 226 209;
  --title-start: #9B6BFF;
  --title-end: #4DE2D1;
  --page-base: #100e18;
  --page-top: #1c1427;
  --card-base: #191522;
  --ink: #f6f1ff;
  --muted: #bdb3ca;
  --button-ink: #1c0e2a;
  --gameplay: url('/assets/blossom/gameplay.webp');
}

:root[data-suite="mystic"] {
  --brand: #4DE2D1;
  --brand-highlight: #B9F6F0;
  --brand-deep: #246B49;
  --brand-soft: #173F40;
  --brand-rgb: 77 226 209;
  --highlight-rgb: 185 246 240;
  --support-rgb: 155 107 255;
  --title-start: #4DE2D1;
  --title-end: #9B6BFF;
  --page-base: #0c171b;
  --page-top: #102a2d;
  --card-base: #142328;
  --ink: #eefbf8;
  --muted: #b0c7c5;
  --button-ink: #0b2423;
  --gameplay: url('/assets/mystic/gameplay.webp');
}

:root {
  --line: rgb(var(--highlight-rgb) / .15);
  --line-strong: rgb(var(--highlight-rgb) / .3);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --topbar-h: 64px;
  --swap: .45s ease;
  color-scheme: dark;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 12% -8%, rgb(var(--brand-rgb) / .2), transparent 62%),
    radial-gradient(900px 480px at 100% 0%, rgb(var(--support-rgb) / .1), transparent 60%),
    linear-gradient(var(--page-top), var(--page-base) 640px);
  background-color: var(--page-base);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background-color var(--swap), color var(--swap);
}
a { color: var(--brand-highlight); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; }
code { font: .92em/1.4 ui-monospace, Consolas, monospace; padding: 1px 5px; border-radius: 5px; background: rgb(var(--highlight-rgb) / .1); }
:focus-visible { outline: 2px solid var(--brand-highlight); outline-offset: 3px; }

.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 8px; top: 8px; z-index: 100;
  padding: 8px 12px; border-radius: 8px;
  background: var(--brand); color: var(--button-ink);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
.noscript { margin: 0; padding: 10px var(--gutter); text-align: center; background: var(--brand-soft); color: var(--ink); font-size: 14px; }

.eyebrow {
  margin: 0 0 10px; color: var(--brand);
  font: 13px/1.4 SuitePixel, monospace; letter-spacing: .08em; text-transform: uppercase;
  transition: color var(--swap);
}
.eyebrow a { color: inherit; }

.gradient-title, .gradient-text {
  background: linear-gradient(90deg, var(--title-start), var(--title-end));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Minecrafter is very wide: "BLOSSOMSUITE" is ~8.4em. Size it to the hero column so it never clips. */
.gradient-title {
  margin: 0;
  font-family: Minecrafter, system-ui, sans-serif; font-weight: normal;
  font-size: clamp(36px, 4.4vw, 62px); line-height: 1;
  white-space: nowrap;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 650; text-decoration: none; line-height: 1.2;
  transition: background var(--swap), color var(--swap), border-color .2s, transform .15s, box-shadow .2s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: var(--button-ink); box-shadow: 0 8px 24px rgb(var(--brand-rgb) / .28); }
.button-primary:hover { box-shadow: 0 10px 30px rgb(var(--brand-rgb) / .4); }
.button-ghost { border: 1px solid var(--line-strong); color: var(--ink); background: rgb(0 0 0 / .15); }
.button-ghost:hover { border-color: var(--brand); }
.text-link { display: inline-block; margin-top: 14px; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.card {
  background: linear-gradient(180deg, rgb(var(--brand-rgb) / .07), transparent 70%), var(--card-base);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: background-color var(--swap), border-color var(--swap);
}

.section { padding-top: 88px; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2, .page-hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); }
.section-lede { margin: 0; color: var(--muted); }
.section-lede a { white-space: nowrap; }
.empty-note { margin: 0; color: var(--muted); }
.tag {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  border: 1px solid var(--line-strong); color: var(--muted);
  font: 600 11px/1.4 system-ui, sans-serif; letter-spacing: .02em;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgb(0 0 0 / .4);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--topbar-h); display: flex; align-items: center; gap: 24px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--ink); text-decoration: none;
  font: 17px/1 SuitePixel, monospace; letter-spacing: .05em;
}
.wordmark-mark { color: var(--brand); font-size: 20px; transition: color var(--swap); }

.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav a {
  padding: 8px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px;
}
.nav a:hover { color: var(--ink); background: rgb(var(--highlight-rgb) / .06); }
.nav a[aria-current="page"] { color: var(--ink); background: rgb(var(--brand-rgb) / .14); }
.nav .nav-cta { margin-left: 8px; color: var(--brand-highlight); border: 1px solid rgb(var(--brand-rgb) / .45); }
.nav .nav-cta:hover { color: var(--button-ink); background: var(--brand); border-color: var(--brand); }

/* The toggle: a two-option segmented control with a sliding thumb. */
.suite-toggle {
  position: relative; flex-shrink: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 999px;
  background: rgb(0 0 0 / .35); border: 1px solid var(--line);
}
.suite-toggle button {
  position: relative; z-index: 1;
  border: 0; background: none; cursor: pointer;
  padding: 7px 15px; border-radius: 999px;
  font: 650 14px/1 system-ui, sans-serif; color: var(--muted);
  transition: color var(--swap);
}
.suite-toggle button[aria-checked="true"] { color: var(--button-ink); }
.suite-toggle button:not([aria-checked="true"]):hover { color: var(--ink); }
.suite-toggle-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px;
  background: linear-gradient(90deg, var(--title-start), var(--title-end));
  box-shadow: 0 0 18px rgb(var(--brand-rgb) / .45);
  transition: transform var(--swap), background var(--swap), box-shadow var(--swap);
}
:root[data-suite="mystic"] .suite-toggle-thumb { transform: translateX(100%); }

.menu-button {
  display: none; width: 42px; height: 42px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgb(0 0 0 / .25); color: var(--ink); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; margin: 0 auto; border-radius: 2px;
  background: currentColor; transition: transform .2s, opacity .2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Home: hero ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
  padding-top: 64px;
}
.hero-tagline { margin: 18px 0 10px; font-size: clamp(22px, 2.6vw, 28px); }
.hero-lede { margin: 0 0 26px; color: var(--muted); max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.hero-meta b { color: var(--ink); font-weight: 600; }

/* ---------- Home: cooldown HUD preview (ported from the original sites) ---------- */

.gameplay-demo { min-width: 0; }
.gameplay-preview {
  position: relative; overflow: hidden;
  height: 340px; width: 100%;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #343744 var(--gameplay) center / cover no-repeat;
  image-rendering: pixelated;
  box-shadow: 0 24px 60px rgb(0 0 0 / .45), 0 0 0 1px rgb(var(--brand-rgb) / .1);
  transition: height .3s ease;
}
.gameplay-preview::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .09); pointer-events: none; }
.gameplay-preview.has-alt { height: 500px; }

.hud-position {
  --hud-scale: 2; --hud-width: 200px; --hud-height: 110px;
  position: absolute; left: 50%; top: 41%; z-index: 1; pointer-events: none;
  width: calc(var(--hud-width) * var(--hud-scale)); height: calc(var(--hud-height) * var(--hud-scale));
  transform: translate(-50%, -50%);
}
.hud-position.is-compact { --hud-width: 70px; --hud-height: 96px; }
.hud-position.has-alt { --hud-height: 182px; }

.cooldown-hud {
  box-sizing: border-box; width: 200px; height: 110px; padding: 2px;
  color: #fff; font: normal 8px/9px SuitePixel, monospace;
  image-rendering: pixelated; -webkit-font-smoothing: none;
  text-shadow: 1px 1px rgb(0 0 0 / .75);
  transform: scale(var(--hud-scale)); transform-origin: top left;
}
.cooldown-hud .panel { width: 196px; height: 107px; background: rgb(0 0 0 / .33); overflow: hidden; }
.cooldown-hud .header { height: 14px; padding: 4px 4px 0; background: rgb(0 0 0 / .45); white-space: nowrap; }
.cooldown-hud .divider { height: 1px; margin: 0 4px 2px; background: rgb(255 255 255 / .198); }
.cooldown-hud .cooldown-row {
  height: 18px; padding: 1px 4px 0;
  display: grid; grid-template-columns: 16px minmax(0, 1fr) max-content; align-items: start; column-gap: 2px;
}
.cooldown-hud .icon-wrap { position: relative; width: 16px; height: 16px; }
.cooldown-hud .item-icon { width: 16px; height: 16px; object-fit: contain; image-rendering: pixelated; }
.cooldown-hud .cooldown-row.active .icon-wrap::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .533); }
.cooldown-hud .item-name, .cooldown-hud .cooldown-time { min-width: 0; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cooldown-hud .item-name { margin-right: 4px; }
.cooldown-hud .cooldown-time { justify-self: end; }
.cooldown-hud .cooldown-row.active .item-name { color: #7d8593; }
.cooldown-hud .cooldown-row.active .cooldown-time { color: #bfc7d5; }
.cooldown-hud .cooldown-row.ready .item-name { color: #fff; }
.cooldown-hud .cooldown-row.ready .cooldown-time { color: #7cff9b; }
.cooldown-hud.compact { width: 70px; height: 96px; }
.cooldown-hud.compact .panel { width: 66px; height: 93px; padding-top: 3px; }
.cooldown-hud.compact .header, .cooldown-hud.compact .divider, .cooldown-hud.compact .item-name { display: none; }
.cooldown-hud.compact .cooldown-row { grid-template-columns: 16px 1fr; }
.cooldown-hud.compact .cooldown-time { margin-top: 3px; justify-self: start; }
.cooldown-hud.has-alt { height: 182px; }
.cooldown-hud.has-alt .panel { height: 179px; }
.cooldown-hud .alt-spacer { position: relative; height: 18px; }
.cooldown-hud .alt-spacer::after { content: ""; position: absolute; left: 4px; right: 4px; top: 9px; height: 1px; background: rgb(255 255 255 / .198); }
.cooldown-hud .alt-heading { height: 18px; padding: 3px 4px 0; color: #fff; }
.cooldown-hud .alt-player { height: 18px; padding: 3px 4px 0; color: #7d8593; }

.demo-hotbar-position { position: absolute; left: 50%; bottom: 12px; z-index: 1; width: 360px; height: 40px; transform: translateX(-50%); }
.demo-hotbar { width: 180px; height: 20px; display: grid; grid-template-columns: repeat(9, 20px); transform: scale(2); transform-origin: top left; image-rendering: pixelated; }
.hotbar-slot { position: relative; width: 20px; height: 20px; background: rgb(18 18 18 / .66); border: 1px solid rgb(215 215 215 / .27); }
.hotbar-slot.selected { border-color: #f5f5f5; }
.hotbar-slot .hotbar-item { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; object-fit: contain; image-rendering: pixelated; }
.hotbar-track { position: absolute; left: 1px; top: 1px; width: 16px; height: 3px; background: rgb(0 0 0 / .4); }
.hotbar-fill { display: block; height: 3px; width: var(--fill); background: #fff; }
.hotbar-number { position: absolute; left: 0; right: 0; top: 4px; text-align: center; color: #fff; font: normal 8px/9px SuitePixel, monospace; text-shadow: 1px 1px rgb(0 0 0 / .75); }

.demo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; color: var(--muted); font-size: 13px; }
.demo-toolbar p { margin: 0; }
.mode-switch { display: flex; flex-shrink: 0; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: 9px; }
.mode-switch button {
  padding: 6px 9px; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--muted);
  font: 700 11px/1.2 system-ui, sans-serif; letter-spacing: .06em;
}
.mode-switch button:hover { color: var(--ink); }
.mode-switch button[aria-pressed="true"] { background: var(--brand); color: var(--button-ink); }

/* ---------- Home: features, latest update, vaults ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; }
.feature h3 { margin: 14px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  background: rgb(var(--brand-rgb) / .16); color: var(--brand-highlight); font-size: 20px;
}

.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.split .section-head { margin-bottom: 0; position: sticky; top: calc(var(--topbar-h) + 24px); }

.vault-teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center;
  padding: 28px;
}
.vault-teaser img { border-radius: 10px; border: 1px solid var(--line); }
.vault-teaser h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); }
.vault-teaser p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); }

/* ---------- Scoreboard (shared by the floating sidebar and the Leaderboard page) ---------- */

.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.board-tabs:empty { display: none; }
.board-tabs button {
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
  font: 600 13px/1.2 system-ui, sans-serif;
}
.board-tabs button:hover { color: var(--ink); }
.board-tabs button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--button-ink); }
.board-status { margin: 0; color: var(--muted); }
.board-status[hidden] { display: none; }
.board-list { list-style: none; margin: 0; padding: 0; font-family: SuitePixel, monospace; -webkit-font-smoothing: none; }
.board-row { --medal: #7d8593; --medal-rgb: var(--highlight-rgb); }
.board-row:nth-child(1) { --medal: #ffaa00; --medal-rgb: 255 170 0; }
.board-row:nth-child(2) { --medal: #c9d1dc; --medal-rgb: 201 209 220; }
.board-row:nth-child(3) { --medal: #cd7f32; --medal-rgb: 205 127 50; }
.board-rank { color: var(--medal); text-align: right; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; text-transform: none; }
.board-score { color: #ff5555; }

/* Leaderboard page: the full board. */
.board-card {
  padding: 26px; border-radius: 18px;
  background: radial-gradient(520px 200px at 0% 0%, rgb(255 170 0 / .08), transparent 70%), var(--card-base);
  border: 1px solid var(--line);
}
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.board-toolbar:has(.board-tabs:empty) .board-updated { margin-left: auto; }
.board-updated { color: var(--muted); font-size: 13px; }
.board-full .board-list { display: grid; gap: 8px; }
.board-full .board-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) max-content; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 10px;
  background: rgb(0 0 0 / .28); border: 1px solid rgb(255 255 255 / .05);
  font-size: 16px; line-height: 20px; text-shadow: 1px 1px rgb(0 0 0 / .6);
}
.board-full .board-row:nth-child(-n+3) {
  padding-top: 16px; padding-bottom: 16px; font-size: 18px;
  border-color: rgb(var(--medal-rgb) / .4);
  background: linear-gradient(90deg, rgb(var(--medal-rgb) / .22), rgb(0 0 0 / .25) 70%);
  box-shadow: inset 3px 0 0 var(--medal);
}

/* Floating sidebar on every other page, styled like the in-game scoreboard. */
.float-board[hidden] { display: none; }
.float-board {
  position: fixed; right: 0; top: 50%; z-index: 15; transform: translateY(-50%);
  display: flex; align-items: center; pointer-events: none;
  font-family: SuitePixel, monospace; -webkit-font-smoothing: none;
}
.float-board > * { pointer-events: auto; }
.float-board-tab {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 14px 8px; border: 1px solid rgb(var(--brand-rgb) / .45); border-left: 0; border-radius: 0 8px 8px 0;
  background: rgb(0 0 0 / .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--brand-highlight); font: normal 12px/1 SuitePixel, monospace; letter-spacing: .12em;
  text-shadow: 1px 1px rgb(0 0 0 / .75); box-shadow: 0 8px 24px rgb(0 0 0 / .35);
}
.float-board-tab:hover { color: #fff; border-color: var(--brand); }
.float-board-icon { transform: rotate(90deg); font-size: 14px; color: #ffaa00; }
.float-board-panel {
  width: 268px; margin-right: 16px;
  background: rgb(0 0 0 / .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgb(var(--highlight-rgb) / .14); box-shadow: 0 18px 40px rgb(0 0 0 / .45);
  color: #fff; text-shadow: 1px 1px rgb(0 0 0 / .75);
  animation: float-board-in .22s ease-out;
}
.float-board.is-open .float-board-tab, .float-board:not(.is-open) .float-board-panel { display: none; }
@keyframes float-board-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.float-board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 6px 7px 12px; background: rgb(0 0 0 / .4); }
.float-board-title { flex: 1; padding-left: 22px; text-align: center; font-size: 12px; letter-spacing: .06em; color: #ffff55; }
.float-board-hide {
  display: grid; place-items: center; width: 24px; height: 24px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: #bfc7d5; font: normal 12px/1 SuitePixel, monospace;
}
.float-board-hide:hover { color: #fff; border-color: rgb(var(--highlight-rgb) / .3); }
.float-board .board-tabs { gap: 4px; padding: 7px 8px 0; }
.float-board .board-tabs button {
  flex: 1 1 auto; min-width: 0; padding: 4px 6px; border-radius: 0;
  font: normal 8px/1.2 SuitePixel, monospace; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.float-board .board-tabs button[aria-pressed="true"] { text-shadow: none; }
.float-board .board-status { padding: 10px 12px 0; font: 500 12px/1.4 system-ui, sans-serif; text-shadow: none; }
.float-board .board-list { padding: 7px 0 6px; }
.float-board .board-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) max-content; align-items: center; gap: 6px;
  padding: 3px 12px; font-size: 12px; line-height: 16px;
}
.float-board .board-row:nth-child(odd) { background: rgb(255 255 255 / .025); }
.float-board .board-row:nth-child(-n+3) {
  box-shadow: inset 3px 0 0 var(--medal);
  background: linear-gradient(90deg, rgb(var(--medal-rgb) / .34), rgb(var(--medal-rgb) / .08));
}
.float-board-foot { padding: 7px 12px 9px; border-top: 1px solid rgb(255 255 255 / .12); font: 600 12px/1.35 system-ui, sans-serif; text-shadow: none; }
.float-board-foot a { color: var(--brand-highlight); text-decoration: none; }
.float-board-foot a:hover { text-decoration: underline; }

.cta {
  margin-top: 96px; padding-top: 56px; padding-bottom: 56px; text-align: center;
  border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(640px 260px at 50% 0%, rgb(var(--brand-rgb) / .24), transparent 70%), var(--card-base);
}
.cta h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); }
.cta p { margin: 0 0 24px; color: var(--muted); }

/* ---------- Patch notes ---------- */

.patch-list { display: grid; gap: 16px; }
.patch-list[aria-busy="true"]::before { content: "Loading patch notes…"; color: var(--muted); }
.patch { padding: 24px 26px; background: var(--card-base); border: 1px solid var(--line); border-radius: var(--radius); }
.patch-latest { border-color: rgb(var(--brand-rgb) / .55); box-shadow: 0 0 0 1px rgb(var(--brand-rgb) / .18), 0 18px 40px rgb(0 0 0 / .25); }
.patch-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.patch-version { font: 15px/1 SuitePixel, monospace; color: var(--brand); }
.patch-date { color: var(--muted); font-size: 14px; }
.patch-badge {
  margin-left: auto; padding: 3px 10px; border-radius: 999px;
  background: var(--brand); color: var(--button-ink); font-size: 12px; font-weight: 700;
}
.patch-badge-soon { background: transparent; color: var(--brand-highlight); border: 1px solid rgb(var(--brand-rgb) / .6); }
.patch-title { margin: 12px 0 16px; font-size: 21px; }
.patch-entries { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.patch-entries li { padding-left: 14px; border-left: 2px solid rgb(var(--brand-rgb) / .5); }
.patch-entries strong { display: block; }
.patch-entries p { margin: 3px 0 0; color: var(--muted); }

/* ---------- Inner pages ---------- */

.page-hero { padding-top: 64px; padding-bottom: 36px; max-width: 820px; margin-left: auto; margin-right: auto; }
.page-hero h1 { font-size: clamp(34px, 5.5vw, 54px); }
.updated { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.callout {
  margin: 28px 0; padding: 20px 22px; border-radius: var(--radius);
  background: rgb(var(--brand-rgb) / .08); border: 1px solid rgb(var(--brand-rgb) / .3);
}
.callout h2 { margin: 0 0 6px; font-size: 20px; }
.callout p { margin: 0; color: var(--muted); }
.callout p + p, .callout ul + p { margin-top: 10px; }
.callout ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }

/* Vaults guide */
.vault-jump { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vault-card { display: grid; gap: 6px; padding: 20px; color: var(--ink); text-decoration: none; }
.vault-card:hover { border-color: rgb(var(--brand-rgb) / .55); }
.vault-card b { font-size: 18px; }
.vault-card span:last-child { color: var(--muted); }
.vault-limit { font: 11px/1.4 SuitePixel, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.guide-section { padding-top: 64px; }
.guide-section > h2 { margin: 0 0 8px; font-size: clamp(26px, 3.6vw, 34px); }
.guide-section > .section-lede { margin-bottom: 22px; }
.guide-steps { display: grid; gap: 16px; }
.guide-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 26px; }
.guide-step.wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.guide-copy h3 { margin: 8px 0 8px; font-size: 21px; }
.guide-copy p { margin: 0; color: var(--muted); }
.guide-copy p + p { margin-top: 10px; }
.guide-copy strong { color: var(--ink); }
.step-label { font: 12px/1.4 SuitePixel, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.guide-step figure { margin: 0; }
.guide-step img { margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); image-rendering: pixelated; }
.guide-step figure.tall img { max-height: 380px; width: auto; }
.guide-step figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }

/* Privacy */
.privacy-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc {
  position: sticky; top: calc(var(--topbar-h) + 24px);
  display: grid; gap: 2px; padding: 16px; border-radius: var(--radius);
  background: var(--card-base); border: 1px solid var(--line); font-size: 14px;
}
.toc strong { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.toc a { padding: 4px 8px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); background: rgb(var(--highlight-rgb) / .06); }
.policy { max-width: 760px; }
.policy-section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.policy-section:last-child { border-bottom: 0; }
.policy-section h2 { margin: 0 0 14px; font-size: 26px; }
.policy-section h3 { margin: 22px 0 8px; font-size: 18px; }
.policy-section p, .policy-section li { color: var(--muted); }
.policy-section strong { color: var(--ink); }
.policy-section ul { padding-left: 22px; }
.policy-section li + li { margin-top: 4px; }
.summary { padding: 20px 22px; border-radius: var(--radius); background: var(--card-base); border: 1px solid var(--line); }
.summary h3 { margin-top: 0; }

/* ---------- Footer ---------- */

.footer { margin-top: 96px; border-top: 1px solid var(--line); background: rgb(0 0 0 / .18); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; padding-top: 26px; padding-bottom: 36px; color: var(--muted); font-size: 14px; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .gradient-title { font-size: clamp(30px, 8.6vw, 76px); }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split .section-head { position: static; }
  .privacy-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .toc strong { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .menu-button { display: grid; place-items: center; }
  .topbar-inner { gap: 12px; }
  .wordmark { margin-right: auto; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--topbar-h);
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--page-base); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgb(0 0 0 / .45);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .18s, transform .18s, visibility 0s .18s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .18s, transform .18s; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .feature-grid, .vault-jump { grid-template-columns: 1fr; }
  .vault-teaser, .guide-step, .guide-step.wide { grid-template-columns: 1fr; gap: 20px; }
  /* On narrow screens the sidebar sits in the bottom corner instead of mid-screen. */
  .float-board { top: auto; bottom: 16px; transform: none; align-items: flex-end; }
  .float-board-panel { width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto; }
  .section { padding-top: 64px; }
}

@media (max-width: 600px) {
  .gameplay-preview { height: 285px; }
  .gameplay-preview.has-alt { height: 380px; }
  .hud-position { --hud-scale: 1.35; top: 42%; }
  .demo-hotbar-position { bottom: 10px; transform: translateX(-50%) scale(.78); }
  .demo-toolbar { flex-direction: column; align-items: flex-start; }
  .board-card, .vault-teaser, .guide-step, .feature { padding: 20px; }
  .board-full .board-row { padding: 10px 12px; gap: 10px; font-size: 14px; }
  .board-full .board-row:nth-child(-n+3) { font-size: 15px; }
}

@media (max-width: 440px) {
  .wordmark-text { display: none; }
  .suite-toggle button { padding: 7px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --swap: 0s; }
  html { scroll-behavior: auto; }
  .button:hover { transform: none; }
  .gameplay-preview, .nav, .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; }
  .float-board-panel { animation: none; }
}
