/* JohnnY Patches — sunset over a dark plum night. */

@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/Cormorant.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/Cormorant-italic.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/Montserrat.woff2) format('woff2'); }

:root {
  --bg: #120a18;
  --bg-2: #1a1022;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f6eff7;
  --muted: #bcaac6;
  --faint: #8d7a99;
  --violet: #9a6cf0;
  --pink: #ef8fb4;
  --peach: #f6c0a6;
  --gain: #8fe3c0;
  --loss: #ff9a9a;
  --grad: linear-gradient(90deg, var(--violet), var(--pink));
  --sky: linear-gradient(180deg, #4b3796 0%, #7c4eb0 28%, #b45bae 55%, #e0799f 76%, #f3ab9f 90%, #f8c9a8 100%);
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  --radius: 14px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; font-variant-numeric: lining-nums; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(239, 143, 180, 0.35); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

/* ---- type ---- */
.kicker { margin: 0 0 14px; font: 600 11.5px/1 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; color: rgba(255, 255, 255, 0.86); }
.kicker-dim { color: var(--pink); }
.display { margin: 0; font: 500 clamp(44px, 7.4vw, 92px)/0.98 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.display-game { font-size: clamp(40px, 6vw, 76px); }
.lede { margin: 18px 0 0; max-width: 36em; font-size: clamp(15.5px, 1.6vw, 18px); color: rgba(255, 255, 255, 0.86); text-wrap: pretty; }
.h2 { margin: 0; font: 500 clamp(34px, 4vw, 48px)/1.05 var(--serif); }
.h3 { margin: 0 0 18px; font: 600 13px/1.2 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.prose { color: #e6dbea; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h3, .prose h4, .prose h5 { margin: 1.4em 0 0.5em; font: 600 17px/1.3 var(--sans); color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: 0.25em 0; }
.prose a { color: var(--pink); text-underline-offset: 3px; }
.prose code, .hash code { font: 13px var(--mono); background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 5px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose-sm { font-size: 14.5px; }

/* ---- buttons & chips ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 14px/1 var(--sans); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: #fff; color: #2a1236; box-shadow: 0 10px 30px -10px rgba(239, 143, 180, 0.55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(239, 143, 180, 0.75); }
.btn-ghost { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .meta { color: var(--muted); font-weight: 500; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font: 600 11.5px/1.3 var(--sans); letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; }
.chip-gain { color: var(--gain); background: rgba(143, 227, 192, 0.08); border-color: rgba(143, 227, 192, 0.25); }
.chip-loss { color: var(--loss); background: rgba(255, 154, 154, 0.08); border-color: rgba(255, 154, 154, 0.25); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }

/* ---- header / footer ---- */
.site-head { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); background: rgba(18, 10, 24, 0.55); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.site-head-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-word { font: 600 27px/1 var(--serif); letter-spacing: 0.01em; }
.brand-tag { font: 600 10.5px/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a { font: 500 14px/1 var(--sans); text-decoration: none; color: var(--muted); padding: 8px 0; transition: color 0.15s; }
.site-nav a:hover { color: var(--text); }
.site-foot { border-top: 1px solid var(--line); margin-top: 96px; }
.site-foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px 0 36px; color: var(--faint); font-size: 13px; }
.site-foot p { margin: 0; }
.foot-brand .brand-word { font-size: 20px; color: var(--muted); }
.foot-sep { margin: 0 4px; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(84px, 13vw, 150px) 0 clamp(110px, 14vw, 170px); margin-top: -64px; padding-top: calc(64px + clamp(84px, 13vw, 150px)); }
.hero-sky { position: absolute; inset: 0; z-index: -2; background: var(--sky); }
.hero-sky::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 45% at 72% 92%, rgba(255, 214, 170, 0.55), transparent 70%), radial-gradient(ellipse 50% 60% at 10% 10%, rgba(70, 40, 150, 0.45), transparent 70%); }
.hero-sky::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(180deg, transparent, rgba(18, 10, 24, 0.25) 35%, var(--bg)); }
.hero-trace { position: absolute; z-index: -1; left: 0; right: 0; bottom: 22px; width: 100%; height: 78px; color: rgba(255, 255, 255, 0.55); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.hero-inner { position: relative; }
.hero .display { max-width: 11.5em; text-shadow: 0 2px 30px rgba(60, 20, 70, 0.35); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 34px 0 34px; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font: 600 10.5px/1 var(--sans); letter-spacing: 0.26em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-top: 6px; }
.hero-stats dd { margin: 0; font: 600 24px/1.1 var(--sans); letter-spacing: -0.01em; }

/* ---- sections ---- */
.section { padding-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.search input { width: min(320px, 80vw); padding: 12px 16px 12px 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23bcaac6' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 15px center; outline: none; transition: border-color 0.15s; }
.search input:focus { border-color: var(--pink); }

/* ---- game cards ---- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease; }
.card-link:hover { transform: translateY(-3px); border-color: rgba(239, 143, 180, 0.4); box-shadow: 0 22px 50px -24px rgba(239, 143, 180, 0.45); }
.card-media { position: relative; aspect-ratio: 460 / 215; background: var(--sky); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card-link:hover .card-media img { transform: scale(1.035); }
.card-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 64px/1 var(--serif); color: rgba(255, 255, 255, 0.9); }
.card-flag { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(18, 10, 24, 0.7); backdrop-filter: blur(6px); font: 600 10.5px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.card-title { margin: 0; font: 600 25px/1.1 var(--serif); }
.card-tag { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 8px; }
.card-meta .meta { font-size: 12.5px; color: var(--faint); font-weight: 500; }
.empty-state { padding: 56px 28px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty-state .h3 { color: var(--text); margin-bottom: 8px; letter-spacing: 0.08em; }
.empty { color: var(--muted); }

/* ---- about ---- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; padding-top: 96px; }
.about .h2 { margin-bottom: 18px; }
.about-text .prose { font-size: 16.5px; max-width: 38em; }
.about-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.about-card-title { margin: 0 0 10px; font: 600 11px/1 var(--sans); letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list a, .side-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.link-list li:last-child a { border-bottom: 0; }
.link-list a:hover, .side-link:hover { color: var(--pink); }
.about-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* ---- game page ---- */
.preview-bar { background: #3a1d47; color: var(--peach); text-align: center; padding: 10px 16px; font-size: 13.5px; font-weight: 500; }
.preview-bar a { color: #fff; margin-left: 8px; }
.game-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -64px; padding: calc(64px + clamp(70px, 10vw, 130px)) 0 clamp(48px, 6vw, 72px); min-height: 440px; display: flex; align-items: flex-end; }
.game-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.game-hero-ph { background: var(--sky); }
.game-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18, 10, 24, 0.35) 0%, rgba(18, 10, 24, 0.25) 35%, rgba(18, 10, 24, 0.85) 80%, var(--bg) 100%), linear-gradient(90deg, rgba(40, 18, 60, 0.55), transparent 65%); }
.back { display: inline-block; margin-bottom: 26px; font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.back:hover { color: #fff; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; margin-top: 12px; }
.block { padding: 28px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 8px; }

.metrics { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.metric { padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.metric-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.metric-label { font-weight: 600; font-size: 15px; }
.metric-bars { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px 14px; }
.metric-name { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.bar { width: 100%; height: 8px; }
.bar-track { fill: rgba(255, 255, 255, 0.06); }
.bar-before { fill: rgba(188, 170, 198, 0.45); }
.bar-after { fill: url(#jp-grad); }
.metric-val { font: 500 13.5px/1 var(--mono); color: var(--muted); text-align: right; min-width: 72px; }
.metric-val-after { color: var(--text); }
.defs { position: absolute; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.features li { position: relative; padding-left: 30px; }
.features li::before { content: ''; position: absolute; left: 0; top: 0.42em; width: 18px; height: 18px; border-radius: 50%; background: rgba(143, 227, 192, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238fe3c0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 2px 44px; min-height: 30px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font: 600 13px/1 var(--sans); color: var(--pink); }

.releases { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.release { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.release-latest { border-color: rgba(239, 143, 180, 0.3); }
.release-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.release-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.release-ver { font: 600 17px/1 var(--sans); }
.release-date { color: var(--faint); font-size: 13px; }
.release .prose { margin-top: 12px; }
.hash { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.hash code { font-size: 11.5px; word-break: break-all; color: var(--muted); }
.hash-label { font-weight: 600; letter-spacing: 0.12em; }
.copy { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--muted); }
.copy:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

.game-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.dl-card, .side-card { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.dl-card { background: linear-gradient(160deg, rgba(154, 108, 240, 0.16), rgba(239, 143, 180, 0.1) 60%, rgba(255, 255, 255, 0.03)); border-color: rgba(239, 143, 180, 0.28); }
.dl-title, .side-title { margin: 0 0 4px; font: 600 11px/1 var(--sans); letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.side-title { margin-bottom: 14px; }
.dl-ver { margin: 8px 0 18px; font: 600 30px/1 var(--sans); letter-spacing: -0.02em; }
.dl-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.dl-facts dt { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.dl-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 14px; }
.side-row { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; color: var(--muted); }
.side-row strong { color: var(--text); font-weight: 600; text-align: right; }
.side-note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.reqs { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: #e6dbea; }
.side-link { padding: 14px 4px; border: 0; color: var(--muted); font-size: 14px; }

.notfound { text-align: center; padding-top: 120px; }
.notfound .btn { margin-top: 24px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-side { display: contents; }
  .game-side > * { order: 1; }
  .game-side > .dl-card { order: -1; }
  .about { grid-template-columns: 1fr; padding-top: 72px; }
}
@media (max-width: 560px) {
  .site-nav a:nth-child(2) { display: none; }
  .brand-tag { display: none; }
  .hero-stats { gap: 14px 28px; }
  .metric-bars { grid-template-columns: 50px 1fr auto; gap: 8px 10px; }
  .metric-name { letter-spacing: 0.06em; font-size: 10.5px; }
  .metric-val { min-width: 0; font-size: 12.5px; }
  .dl-facts { grid-template-columns: repeat(3, auto); justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
