:root {
  --ink: #0c1822;
  --navy: #13283a;
  --navy-2: #1b3850;
  --line: rgba(246, 239, 225, .14);
  --cream: #f6efe1;
  --muted: #a9b8c4;
  --orange: #f29a38;
  --orange-hi: #ffb65e;
  --sand: #f2d54a;
  --sky: #6fc3f0;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

.kicker {
  margin: 0 0 .9rem;
  font: 700 .8rem/1.2 var(--pixel);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}

h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; margin: 0; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  font: 600 1rem/1 var(--display);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .card:focus-visible, .nav a:focus-visible, .footer a:focus-visible {
  outline: 3px solid var(--sand); outline-offset: 3px;
}
.btn-primary {
  background: var(--orange); color: #1a1006;
  box-shadow: 0 4px 0 #b8651a, 0 10px 28px rgba(242, 154, 56, .28);
}
.btn-primary:hover { background: var(--orange-hi); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8651a; }
.btn-ghost { border: 1.5px solid rgba(246, 239, 225, .35); color: var(--cream); background: rgba(12, 24, 34, .35); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cream); }

/* ---------- language switcher ---------- */
.nav-links { align-items: center; }
.lang { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 999px;
  border: 1.5px solid rgba(246, 239, 225, .25); background: rgba(12, 24, 34, .55);
  color: var(--muted); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lang-toggle:hover, .lang.open .lang-toggle { border-color: var(--cream); color: var(--cream); }
.lang-toggle:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; }
.lang .fi { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); background-size: cover; flex: none; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 10;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 520px); overflow-y: auto;
  padding: 8px; border-radius: var(--radius);
  background: #102131; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.lang.open .lang-menu { display: grid; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--cream); text-align: start;
  font: 500 .92rem/1.2 var(--display); cursor: pointer;
}
.lang-menu button:hover { background: rgba(246, 239, 225, .08); }
.lang-menu button:focus-visible { outline: 2px solid var(--sand); outline-offset: -2px; }
.lang-menu button[aria-checked="true"] { background: rgba(242, 154, 56, .16); box-shadow: inset 0 0 0 1px rgba(242, 154, 56, .5); }
@media (max-width: 620px) { .lang-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* right-to-left (Arabic) */
[dir="rtl"] .game-bg::after {
  background:
    linear-gradient(270deg, rgba(12,24,34,.96) 0%, rgba(12,24,34,.88) 38%, rgba(12,24,34,.25) 70%, rgba(12,24,34,.1) 100%),
    linear-gradient(var(--ink), transparent 18%, transparent 82%, var(--ink));
}
[dir="rtl"] .kicker, [dir="rtl"] .hint { letter-spacing: 0; }
:lang(ja) .kicker, :lang(ko) .kicker, :lang(zh-CN) .kicker, :lang(zh-TW) .kicker, :lang(th) .kicker { letter-spacing: .04em; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(111, 195, 240, .16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 0%, rgba(242, 154, 56, .14), transparent 70%),
    linear-gradient(#0f2232, var(--ink) 85%);
}
.hero::after { /* faint pixel grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(246,239,225,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246,239,225,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(#000 10%, transparent 75%);
}
#sand {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  z-index: 1;
  touch-action: pan-y;
}

.nav {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(1160px, 100% - 40px); margin: 0 auto; padding: 22px 0;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 700 1.15rem/1 var(--pixel); letter-spacing: .14em;
  text-decoration: none;
}
.wordmark img { border-radius: 6px; image-rendering: pixelated; }
.nav-links { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; transition: color .15s; }
.nav-links a:hover { color: var(--cream); }

.hero-inner {
  position: relative; z-index: 2;
  align-self: center;
  text-align: center;
  padding: 0 20px 18vh;
  pointer-events: none;
}
.hero-inner a { pointer-events: auto; }
.hero h1 {
  font-size: clamp(4.5rem, 17vw, 12.5rem);
  line-height: .85;
  letter-spacing: -.06em;
  text-shadow: 0 6px 40px rgba(12, 24, 34, .8);
}
.lede {
  max-width: 34rem; margin: 1.4rem auto 0;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: #d6dde3;
  text-shadow: 0 2px 16px rgba(12, 24, 34, .9);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.1rem; }

.hint {
  position: relative; z-index: 2;
  justify-self: center;
  margin: 0 0 22px; padding: .55rem .9rem; border-radius: 999px;
  background: rgba(12, 24, 34, .72);
  text-align: center;
  font: 500 .78rem/1 var(--pixel); letter-spacing: .14em; text-transform: uppercase;
  color: rgba(246, 239, 225, .55);
  pointer-events: none;
  animation: bob 2.4s ease-in-out infinite;
}
.hint-touch { display: none; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ---------- game ---------- */
.game {
  position: relative;
  padding: clamp(80px, 12vw, 150px) 0;
  overflow: hidden;
  isolation: isolate;
}
.game-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url("img/junkyard.webp") center 60% / cover no-repeat;
}
.game-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,24,34,.96) 0%, rgba(12,24,34,.88) 38%, rgba(12,24,34,.25) 70%, rgba(12,24,34,.1) 100%),
    linear-gradient(var(--ink), transparent 18%, transparent 82%, var(--ink));
}
.game-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 40px; }
.game h2 { font-size: clamp(3rem, 8vw, 6rem); line-height: .9; }
.game-tagline { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: #dfe6ea; max-width: 32rem; margin: 1.2rem 0 2rem; }

.features { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; gap: 1.1rem; max-width: 34rem; }
.features li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; color: var(--muted); }
.features strong { display: block; color: var(--cream); font-size: 1.08rem; }
.f-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(242, 154, 56, .14); border: 1px solid rgba(242, 154, 56, .4);
  color: var(--orange); font-size: 1.3rem;
}

.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.steam-soon {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.2rem; border-radius: 999px;
  border: 1.5px dashed rgba(246, 239, 225, .4);
  color: var(--cream); font-weight: 600;
  background: rgba(12, 24, 34, .5);
}

.game-hero { display: grid; place-items: center; min-height: 420px; }
.astro { position: relative; width: clamp(180px, 24vw, 300px); animation: float 5s ease-in-out infinite; filter: drop-shadow(0 24px 30px rgba(0,0,0,.45)); }
.astro img { position: relative; z-index: 1; }
.jet {
  position: absolute; z-index: 0;
  left: 8%; top: 62%;
  width: 30%; aspect-ratio: 1 / 2;
  background: url("img/jet.png") 0 0 / 400% 100% no-repeat;
  animation: jet .32s steps(4) infinite;
  transform-origin: top center;
  filter: drop-shadow(0 0 12px rgba(111, 195, 240, .8));
}
@keyframes jet { to { background-position: 133.333% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-22px) rotate(2deg); } }

/* ---------- about ---------- */
.about { padding: clamp(60px, 8vw, 100px) 0 clamp(10px, 2vw, 30px); background: var(--ink); }
.about-grid { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.about-art { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.about-bg { width: 100%; }
.about-hero { position: absolute; left: 30%; bottom: 13%; width: 13%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.about-cat { position: absolute; left: 44%; bottom: 12%; width: 12%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.about-cat svg { display: block; width: 100%; }
.about h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1.2rem; }
.about p { color: var(--muted); max-width: 36rem; font-size: 1.2rem; }

/* ---------- follow ---------- */
.follow { padding: clamp(70px, 10vw, 120px) 0; background: linear-gradient(var(--ink), var(--navy)); }
.follow h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
.cards { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 2.2rem; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } .card-discord { grid-column: auto !important; } }
.card {
  --c: var(--cream);
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--radius);
  background: rgba(246, 239, 225, .04); border: 1px solid var(--line);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--c); background: rgba(246, 239, 225, .07); }
.card svg { width: 30px; height: 30px; flex: none; fill: var(--c); }
.card span { display: grid; line-height: 1.35; color: var(--muted); font-size: .93rem; }
.card strong { color: var(--cream); font-size: 1.05rem; }
.card-discord { --c: #8c9cff; }
@media (max-width: 1000px) { .card-discord { grid-column: span 2; } }
.card-bsky { --c: #4aa8ff; }
.card-yt { --c: #ff5a5a; }
.card-tt { --c: #5ee6e0; }
.card-x { --c: var(--cream); }

/* ---------- footer ---------- */
.footer { background: var(--navy); border-top: 1px solid var(--line); padding: 28px 0 34px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; color: var(--muted); font-size: .93rem; }
.footer-row .wordmark { margin-inline-end: auto; color: var(--cream); font-size: 1rem; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--cream); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .game-grid, .about-grid { grid-template-columns: 1fr; }
  .game-hero { order: -1; min-height: 0; }
  .astro { width: 150px; }
  .game-bg::after { background: linear-gradient(rgba(12,24,34,.55), rgba(12,24,34,.92) 40%, var(--ink)); }
}
@media (max-width: 520px) {
  .nav-links a:not([href^="mailto"]) { display: none; }
  .footer-row .wordmark { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .astro, .jet, .hint { animation: none; }
}

/* ---------- privacy page ---------- */
.doc { padding: 40px 0 90px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin: 30px 0 .4rem; }
.doc h2 { font-size: 1.4rem; letter-spacing: -.01em; margin: 2.2rem 0 .6rem; }
.doc p, .doc li { color: #cdd6dc; }
.doc .updated { color: var(--muted); font-size: .93rem; }
.doc a { color: var(--orange-hi); }
.doc-nav { padding: 22px 0; }
