/* Gamer Temple — site styles */
:root {
  --bg: #0a0912;
  --surface: #14111f;
  --surface-2: #100d1a;
  --line: #26203d;
  --text: #ffffff;
  --muted: #b4acd0;
  --mint: #3df5c8;
  --mint-hover: #8ffbe0;
  --magenta: #ff3ddc;
  --violet: #7b3bff;
  --cyan: #22e6f5;
  --ink: #000000;
  --ring: conic-gradient(from 200deg, #ff3ddc, #7b3bff, #22e6f5, #3df5c8, #ff3ddc);
  --display: "Russo One", Impact, "Arial Black", sans-serif;
  --body: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: url("../img/pattern.svg");
  background-size: 360px 360px;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); }
a:hover { color: var(--mint-hover); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--mint); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: 2.5px solid var(--ink); border-radius: 14px;
  font-family: var(--display); font-size: 16px; letter-spacing: 0.3px;
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { flex: 0 0 auto; }
.btn--primary { background: var(--mint); color: var(--bg); }
.btn--primary:hover { background: var(--mint-hover); color: var(--bg); }
.btn--ig { background: var(--magenta); color: var(--bg); }
.btn--ig:hover { background: #ff7ae8; color: var(--bg); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); box-shadow: 4px 4px 0 var(--violet); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn--ghost:active { box-shadow: 1px 1px 0 var(--violet); }
.btn--flat { box-shadow: none; border-width: 2px; }
.btn--flat:active { transform: none; box-shadow: none; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--lg { min-height: 58px; font-size: 18px; }

.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-size: 17px; text-decoration: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 52px; height: 52px; border-radius: 50%; }
.brand span { font-family: var(--display); font-size: 20px; letter-spacing: 0.5px; }

.site-nav { display: flex; align-items: center; gap: 32px; font-weight: 600; font-size: 17px; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 8px 0; }
.site-nav a:not(.btn):hover { color: var(--mint); }
.site-nav a[aria-current="page"] { color: var(--mint); }

.nav-toggle { display: none; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; font-size: 19px; }
  .site-nav .btn { margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 72px) 0 clamp(48px, 7vw, 80px); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 78px); line-height: 1.02; }
.hero__lede { margin-top: 22px; max-width: 34em; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }

.monk-stage { position: relative; aspect-ratio: 1 / 1.08; width: 100%; max-width: 480px; justify-self: center; }
.monk-stage__ring { position: absolute; left: 5%; right: 5%; top: 4%; aspect-ratio: 1; border-radius: 50%; border: 8px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--ring) border-box; box-shadow: 0 0 60px rgba(123, 59, 255, 0.35); }
.monk-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
/* The desk render is cropped on its right side in the source art, so fade that edge out */
.monk-stage--fade-right img { -webkit-mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 97%); mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 97%); }

@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .monk-stage { max-width: 340px; order: -1; }
}

/* ---------- Sections ---------- */
.band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding: clamp(56px, 8vw, 88px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(34px, 4vw, 48px); }
.section-head p { margin-top: 10px; font-size: 19px; color: var(--muted); }
.section-head__side { display: flex; align-items: flex-end; gap: 24px; }
.section-head__side img { width: 170px; height: auto; }
@media (max-width: 640px) { .section-head__side img { width: 120px; } }

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.game-card { display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden; }
.game-card__media { aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1.5px solid var(--line); }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; }
.game-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.game-card h3 { font-size: 24px; }
.game-card h3 a { color: var(--text); text-decoration: none; }
.game-card h3 a:hover { color: var(--mint); }
.game-card p { font-size: 16px; color: var(--muted); }
.game-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 2px 11px; border-radius: 999px; border: 1.5px solid var(--mint); color: var(--mint); font-weight: 600; font-size: 13px; letter-spacing: 0.5px; }
.tag--cyan { border-color: var(--cyan); color: var(--cyan); }
.tag--magenta { border-color: var(--magenta); color: var(--magenta); }

.empty-state { display: flex; align-items: center; gap: 32px; padding: 36px; border-radius: 22px; background: var(--surface); border: 1.5px dashed var(--line); }
.empty-state img { width: 160px; flex: 0 0 auto; }
.empty-state h3 { font-size: 26px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }
@media (max-width: 640px) { .empty-state { flex-direction: column; text-align: center; } }

/* ---------- Split / prose ---------- */
.split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px 64px; }
.split h2 { font-size: clamp(34px, 4vw, 48px); }
.prose { display: flex; flex-direction: column; gap: 16px; font-size: 20px; color: var(--muted); max-width: 40em; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.kicker { font-weight: 700; font-size: 16px; color: var(--mint); margin-bottom: 14px; }
.timeline { border-bottom: 1px solid var(--line); }
.timeline__item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 40px; padding: 32px 0; border-top: 1px solid var(--line); }
.timeline__when { font-family: var(--display); font-size: 20px; color: var(--mint); }
.timeline__item h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 10px; }
.timeline__item p { font-size: 19px; color: var(--muted); max-width: 42em; }
@media (max-width: 640px) { .timeline__item { grid-template-columns: 1fr; } }

.first-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 24px; }
.first-game { display: flex; gap: 28px; align-items: center; padding: 28px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); }
.first-game img { width: 240px; height: 280px; object-fit: contain; border-radius: 14px; background: #fff; flex: 0 0 auto; }
.first-game__when { font-weight: 700; font-size: 15px; color: var(--mint); }
.first-game h3 { font-size: 28px; margin: 6px 0 10px; }
.first-game p { font-size: 17px; color: var(--muted); }
@media (max-width: 560px) { .first-game { flex-direction: column; align-items: flex-start; } .first-game img { width: 100%; height: 300px; } }

.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.plain-card { padding: 30px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.plain-card h3 { font-size: 26px; margin-bottom: 12px; }
.plain-card p { font-size: 18px; color: var(--muted); }

.feature-box { display: flex; align-items: center; gap: 40px; padding: 0 56px 0 32px; border-radius: 28px; background: var(--violet); overflow: hidden; }
.feature-box img { width: 250px; align-self: flex-end; margin-top: 24px; flex: 0 0 auto; }
.feature-box__text { padding: 40px 0; }
.feature-box h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 14px; }
.feature-box p { color: #f1ecff; font-size: 19px; max-width: 36em; margin-bottom: 22px; }
@media (max-width: 760px) { .feature-box { flex-direction: column-reverse; align-items: flex-start; padding: 0 28px; } .feature-box img { width: 200px; margin-top: 0; } .feature-box__text { padding: 32px 0 0; } }

/* ---------- Game page ---------- */
.crumbs { padding-top: 28px; font-size: 15px; font-weight: 600; color: var(--muted); }
.crumbs a { text-decoration: none; }
.game-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; padding: 24px 0 64px; }
.game-hero__media { border-radius: 22px; overflow: hidden; border: 1.5px solid var(--line); background: var(--surface-2); aspect-ratio: 16 / 10; }
.game-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.game-hero__info { display: flex; flex-direction: column; gap: 18px; }
.game-hero h1 { font-size: clamp(38px, 4.4vw, 52px); }
.game-hero__desc { font-size: 19px; color: var(--muted); }
.game-hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.fine { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .game-hero { grid-template-columns: 1fr; } }

.help-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 220px; gap: 32px; align-items: end; padding-bottom: 72px; }
.help-row > img { width: 220px; }
.panel { padding: 32px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); align-self: stretch; }
.panel h2 { font-size: 28px; margin-bottom: 12px; }
.panel p { color: var(--muted); font-size: 17px; }
.panel p + p { margin-top: 12px; }
.kv { margin: 0; font-size: 17px; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 980px) { .help-row { grid-template-columns: 1fr; } .help-row > img { display: none; } }

/* ---------- Legal ---------- */
.legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; padding: 64px 0 88px; }
.legal__toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; }
.legal__toc strong { font-size: 15px; color: var(--mint); margin-bottom: 8px; }
.legal__toc a { min-height: 40px; display: flex; align-items: center; font-weight: 600; text-decoration: none; font-size: 16px; }
.legal__body { max-width: 780px; }
.legal__body h1 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 16px; }
.legal__intro { font-size: 19px; color: var(--muted); margin-bottom: 32px; }
.legal section { display: flex; flex-direction: column; gap: 14px; padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.legal h2 { font-size: 34px; margin-bottom: 4px; }
.legal h3 { font-size: 21px; margin-top: 12px; }
.legal p { font-size: 17px; line-height: 1.7; color: var(--muted); }
@media (max-width: 820px) { .legal { grid-template-columns: 1fr; gap: 24px; } .legal__toc { position: static; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #07060d; padding: 48px 0; margin-top: auto; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.site-footer__brand { display: flex; align-items: center; gap: 16px; }
.site-footer__brand img { width: 64px; height: 64px; border-radius: 50%; }
.site-footer__brand strong { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; }
.site-footer small { display: block; font-size: 15px; color: var(--muted); }
.site-footer small a { color: inherit; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; font-size: 16px; }
.site-footer nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover { color: var(--text); }

/* ---------- Links page ---------- */
.links-page { max-width: 440px; margin: 0 auto; padding: 44px 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 100vh; }
.avatar { width: 144px; height: 144px; border-radius: 50%; padding: 5px; background: var(--ring); box-shadow: 0 0 40px rgba(123, 59, 255, 0.35); }
.avatar div { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.avatar img { width: 118%; height: auto; margin-left: -9%; margin-top: 4%; max-width: none; }
.links-page h1 { font-size: 30px; }
.links-page__bio { text-align: center; color: var(--muted); font-size: 16px; }
.link-list { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.link-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 20px; border-radius: 16px; text-decoration: none; background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
.link-btn:hover { color: var(--text); border-color: var(--violet); }
.link-btn span { display: flex; flex-direction: column; gap: 2px; }
.link-btn b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.link-btn small { font-size: 14px; opacity: 0.8; }
.link-btn--primary { background: var(--mint); color: var(--bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.link-btn--primary:hover { color: var(--bg); border-color: var(--ink); background: var(--mint-hover); }
.links-page__foot { margin-top: auto; padding-top: 24px; font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); }
.links-page__foot a { color: inherit; }

/* ---------- 404 ---------- */
.not-found { display: flex; align-items: center; gap: 48px; padding: 72px 0 96px; }
.not-found img { width: 260px; }
.not-found h1 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 14px; }
.not-found p { color: var(--muted); font-size: 19px; margin-bottom: 26px; }
@media (max-width: 700px) { .not-found { flex-direction: column; text-align: center; } }

/* ---------- Game page: story + features ---------- */
.story { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 64px; }
.story__poster { width: 100%; border-radius: 18px; border: 1.5px solid var(--line); }
.story__text { display: flex; flex-direction: column; gap: 16px; max-width: 40em; }
.story__text h2, .features h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 4px; }
.story__text p { font-size: 19px; color: var(--muted); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } .story__poster { max-width: 280px; } }
.features { padding-bottom: 64px; }
.features h2 { margin-bottom: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { padding: 22px 24px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { font-size: 16px; color: var(--muted); }
.panel__sub { font-size: 22px !important; margin: 24px 0 10px !important; }
.help-row { align-items: start; }
.help-row > img { align-self: end; }

/* A single game gets a wide feature card */
.game-grid--single { grid-template-columns: 1fr; }
.game-grid--single .game-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.game-grid--single .game-card__media { aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1.5px solid var(--line); }
.game-grid--single .game-card__body { padding: 36px; justify-content: center; gap: 14px; }
.game-grid--single .game-card h3 { font-size: clamp(28px, 3vw, 38px); }
.game-grid--single .game-card p { font-size: 18px; }
.game-grid--single .game-card__actions { margin-top: 8px; }
@media (max-width: 820px) {
  .game-grid--single .game-card { grid-template-columns: 1fr; }
  .game-grid--single .game-card__media { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 1.5px solid var(--line); }
  .game-grid--single .game-card__body { padding: 22px; }
}
