:root {
  --bg: #0a0e17;
  --bg-2: #0f1424;
  --card: rgba(255, 255, 255, .045);
  --card-hover: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .09);
  --text: #f4f6fa;
  --soft: #d9e2ea;
  --muted: #a9bccb;
  --teal: #28d7be;
  --violet: #785af5;
  --grad: linear-gradient(90deg, var(--teal), var(--violet));
  --grad-move: linear-gradient(90deg, var(--teal), var(--violet), var(--teal));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--teal); }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg-2); padding: 8px 12px; z-index: 30; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 14, 23, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .4px; font-size: .95rem; white-space: nowrap; }
.brand span { display: none; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 10px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(40, 215, 190, .12); }

/* ---------- logo mark (SVG, ring rotates) ---------- */
.mark { display: block; flex: none; }
.mark-sm { width: 34px; height: 34px; }
.mark-lg { width: 120px; height: 120px; margin: 0 auto; filter: drop-shadow(0 10px 28px rgba(40, 215, 190, .22)); }
.mark .ring { transform-box: view-box; transform-origin: 50% 50%; animation: spin 48s linear infinite; }
.mark-sm .ring { animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #12423f 0%, #0a0e17 48%, #232a66 100%);
  padding: 48px 0 44px; text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-in { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.6rem); line-height: 1.1; margin: 20px 0 10px; font-weight: 800; letter-spacing: -.5px; }
.lead { margin: 0 auto; color: var(--muted); font-size: clamp(1.05rem, 3.6vw, 1.35rem); max-width: 36ch; }
.particles { position: absolute; inset: 0; pointer-events: none; }
.particles i {
  position: absolute; bottom: -12px; left: var(--x);
  width: var(--s); height: var(--s); border-radius: 2px;
  background: var(--teal); opacity: 0;
  animation: rise var(--d) linear var(--w) infinite;
}
.particles i:nth-child(even) { background: var(--violet); }
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  15% { opacity: .55; }
  80% { opacity: .35; }
  100% { transform: translateY(-560px) rotate(90deg); opacity: 0; }
}

/* animated gradient accent line */
.arrow, h2::after, .page-head h1::after {
  background: var(--grad-move); background-size: 200% 100%;
  animation: flow 6s linear infinite;
}
@keyframes flow { to { background-position: -200% 0; } }
.arrow { display: block; width: 140px; height: 4px; margin: 26px auto; border-radius: 2px; position: relative; }
.arrow::after {
  content: ""; position: absolute; right: -10px; top: -7px;
  border-left: 14px solid var(--violet); border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.cta, .social { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--text); text-decoration: none; font-weight: 600;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn.primary:hover { box-shadow: 0 8px 24px rgba(120, 90, 245, .35); }

/* ---------- sections ---------- */
.section { padding-top: 48px; padding-bottom: 8px; }
h2 { font-size: 1.6rem; margin: 0 0 16px; }
h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 8px; border-radius: 2px; }
#journey p { max-width: 68ch; color: var(--soft); }

.timeline { list-style: none; margin: 20px 0; padding: 0 0 0 18px; border-left: 2px solid rgba(40, 215, 190, .4); }
.timeline li { position: relative; padding: 6px 0 14px 14px; display: flex; flex-direction: column; }
.timeline li::before {
  content: ""; position: absolute; left: -26px; top: 12px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--teal);
}
.timeline .when { color: var(--teal); font-size: .85rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }

/* ---------- game / app cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s;
}
.card:hover, .post-card a:hover, .more-card:hover {
  transform: translateY(-4px);
  border-color: rgba(40, 215, 190, .45);
  background: var(--card-hover);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgba(120, 90, 245, .18), 0 0 28px rgba(40, 215, 190, .12);
}
.card img { flex: none; width: 72px; height: 72px; border-radius: 16px; }
.cards.small .card img { width: 56px; height: 56px; border-radius: 13px; }
.card .body { min-width: 0; }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.3; }
.card p { margin: 0 0 10px; color: #cfd9e2; font-size: .95rem; }
.card .note { display: inline-block; font-size: .8rem; color: var(--teal); border: 1px solid rgba(40, 215, 190, .45); border-radius: 999px; padding: 2px 10px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.store {
  display: inline-block; font-size: .9rem; font-weight: 700; text-decoration: none;
  color: #fff; background: var(--grad); padding: 7px 14px; border-radius: 999px;
}
.store.soon { background: rgba(255, 255, 255, .08); color: var(--muted); border: 1px dashed var(--line); }
.story { font-size: .9rem; font-weight: 700; text-decoration: none; color: var(--teal); }
.story::after { content: " →"; transition: margin-left .2s; }
.story:hover::after { margin-left: 4px; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 !important; font-size: .85rem !important; }
.legal a { color: var(--muted); }
.legal a:hover { color: var(--text); }

/* ---------- post cards ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.post-card a {
  display: flex; gap: 16px; align-items: flex-start; height: 100%;
  padding: 18px; border-radius: 18px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s;
}
.post-card .cover { flex: none; width: 64px; height: 64px; border-radius: 15px; }
.pc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-title { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.pc-title::after { display: none; }
.pc-desc { color: #cfd9e2; font-size: .95rem; }
.pc-meta { color: var(--muted); font-size: .85rem; }
.more-link { text-align: center; margin: 22px 0 0; }

/* ---------- blog index / generic page ---------- */
.page-top { padding-top: 40px; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1.15; margin: 0 0 10px; }
.page-head h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; border-radius: 2px; }
.lead-left { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0; }

/* ---------- post ---------- */
.post-wrap { max-width: 712px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.post-head { margin-bottom: 28px; }
.post-cover { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
svg.post-cover { box-shadow: none; }
.crumb { margin: 18px 0 4px; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.crumb a { text-decoration: none; }
.post-head h1 { font-size: clamp(1.9rem, 6.4vw, 2.6rem); line-height: 1.18; margin: 14px 0 12px; letter-spacing: -.3px; }
.crumb + h1 { margin-top: 0; }
.post-meta { color: var(--muted); margin: 0; font-size: .95rem; }
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--soft); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1.25em; }
.prose h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.8em 0 .6em; color: var(--text); }
.prose h3 { font-size: 1.2rem; margin: 1.5em 0 .5em; color: var(--text); }
.prose strong { color: var(--text); }
.prose a { text-underline-offset: 3px; }
.prose li { margin-bottom: .35em; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--violet); color: var(--text); font-style: italic; }
.prose code { background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--bg-2); padding: 14px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.post-cta { margin: 32px 0 8px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.share span { color: var(--muted); font-weight: 600; margin-right: 4px; }
.share a, .share button {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  color: var(--text); text-decoration: none; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06); transition: background-color .2s;
}
.share a:hover, .share button:hover { background: rgba(255, 255, 255, .12); }
.more-stories { margin-top: 48px; }
.more-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.more-card {
  display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s;
}
.more-card .dir { grid-column: 2; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.more-card .mini { grid-row: 1 / span 2; grid-column: 1; width: 48px; height: 48px; border-radius: 12px; }
.more-card .t { grid-column: 2; font-weight: 700; line-height: 1.35; }

/* ---------- follow / footer ---------- */
#follow { text-align: center; }
#follow h2::after { margin-left: auto; margin-right: auto; }
.contact { margin-top: 20px; color: var(--muted); }
.site-foot { padding: 36px 0 44px; margin-top: 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.site-foot p { margin: 0; }

/* ---------- fade-in on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in { transition: opacity .6s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s; }
.js .card.reveal.in:hover { transform: translateY(-4px); }

@media (min-width: 560px) {
  .brand span { display: inline; }
}
@media (min-width: 700px) {
  .cards, .post-list { grid-template-columns: 1fr 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .more-card.next { grid-column: 2; }
  .hero { padding: 80px 0 68px; }
  .mark-lg { width: 140px; height: 140px; }
}
@media (min-width: 1000px) {
  .cards, .post-list { grid-template-columns: repeat(3, 1fr); }
  .cards.small { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .particles { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover, .post-card a:hover, .more-card:hover, .btn:hover { transform: none; }
}
.related { margin: 24px 0 0; color: var(--muted); font-size: .95rem; }
.related span { font-weight: 700; margin-right: 4px; }
