@font-face {
  font-family: "Lilita One";
  src: url("../assets/fonts/lilita-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  --ink: #1b2347;
  --navy: #222b57;
  --navy-deep: #141a38;
  --navy-plate: #2a3466;
  --blue: #3b8bea;
  --blue-deep: #2458bc;
  --blue-light: #7cbcff;
  --sky-top: #cfe6f7;
  --sky-bottom: #eaf4fb;
  --gold: #ffd447;
  --gold-light: #ffe46b;
  --gold-deep: #e9a400;
  --green: #5dc838;
  --green-deep: #3e9a20;
  --orange: #ff9a2e;
  --orange-deep: #e8731b;
  --red: #e8413a;
  --red-deep: #b5221d;
  --purple: #9b6bff;
  --purple-deep: #6b3fd6;
  --cream: #fff6d8;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --good: #7ee26a;
  --bad: #ff8d85;
  --grass: #7bc950;

  --display: "Lilita One", "Nunito", sans-serif;
  --body: "Nunito", "Segoe UI", sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --outline: 3px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--white);
  background: var(--navy-deep);
  overflow-x: clip;
}

html[lang="az"] .display,
html[lang="tr"] .display,
html[lang="ru"] .display {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 12px;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* Display type: white letters with the navy outline the HUD uses. */
.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
  paint-order: stroke fill;
  -webkit-text-stroke: 5px var(--ink);
  text-shadow: 0 4px 0 var(--ink);
}
.display--gold {
  color: var(--gold);
}
.display--small {
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 0 2px 0 var(--ink);
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  margin: 0 0 1em;
}

/* Toy buttons: top highlight, navy outline, thick bottom edge. */
.btn {
  --btn-top: var(--gold-light);
  --btn-bottom: var(--gold);
  --btn-edge: var(--gold-deep);
  --btn-text: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 28px;
  border: var(--outline) solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--btn-top) 0%, var(--btn-bottom) 55%, var(--btn-edge) 100%);
  box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.45);
  color: var(--btn-text);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.btn:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 2px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.45);
}
.btn[aria-disabled="true"] {
  cursor: default;
  filter: saturate(0.6);
}
.btn[aria-disabled="true"]:active {
  transform: none;
  box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.45);
}
.btn--green {
  --btn-top: #8ee86a;
  --btn-bottom: var(--green);
  --btn-edge: var(--green-deep);
  --btn-text: var(--white);
}
.btn--blue {
  --btn-top: var(--blue-light);
  --btn-bottom: var(--blue);
  --btn-edge: var(--blue-deep);
  --btn-text: var(--white);
}
.btn--red {
  --btn-top: #ff7b74;
  --btn-bottom: var(--red);
  --btn-edge: var(--red-deep);
  --btn-text: var(--white);
}
.btn--white {
  --btn-top: #ffffff;
  --btn-bottom: #e9edf7;
  --btn-edge: #b9c2dc;
  --btn-text: var(--ink);
}
.btn--green,
.btn--blue,
.btn--red {
  paint-order: stroke fill;
  -webkit-text-stroke: 2.5px var(--ink);
  text-shadow: 0 2px 0 var(--ink);
}
.btn--big {
  min-height: 68px;
  padding: 14px 36px;
  font-size: 1.5rem;
  border-radius: 22px;
}
.btn--wide {
  width: 100%;
}
.btn__icon {
  width: 28px;
  height: 28px;
  flex: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn:not([aria-disabled="true"]):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.55);
  }
}

/* Store button: a link once the store URL is known, a "coming soon" badge before that. */
.btn--store {
  --btn-top: #3a4680;
  --btn-bottom: var(--navy);
  --btn-edge: var(--navy-deep);
  --btn-text: var(--white);
  font-family: var(--body);
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  line-height: 1.1;
}
.btn--store .btn__icon {
  width: 32px;
  height: 32px;
}
.btn--store small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}
.btn--store span {
  display: block;
  font-size: 1.05rem;
}
.btn--store[aria-disabled="true"] {
  --btn-top: #4b5680;
  --btn-bottom: #3a4470;
  --btn-edge: #2a325a;
}

/* Blue game panel with the inner light stroke and dark bottom edge. */
.panel {
  position: relative;
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #4a9bf0 0%, #3b8bea 40%, var(--blue-deep) 100%);
  box-shadow: 0 8px 0 var(--ink), inset 0 0 0 3px rgba(255, 255, 255, 0.28);
  padding: clamp(20px, 4vw, 36px);
  color: var(--white);
}
.panel--navy {
  background: linear-gradient(180deg, #2f3a70 0%, var(--navy) 100%);
  box-shadow: 0 8px 0 var(--navy-deep), inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.panel--purple {
  background: linear-gradient(180deg, #b48bff 0%, var(--purple) 40%, var(--purple-deep) 100%);
}
.panel--cream {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 8px 0 var(--ink), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.plate {
  border: var(--outline) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--navy);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.12), 0 3px 0 var(--navy-deep);
  padding: 14px 18px;
}

/* Red ribbon title, as on every popup in the game. */
.ribbon {
  position: relative;
  display: inline-block;
  text-wrap: balance;
  max-width: calc(100% - 40px);
  padding: 10px 34px;
  border: var(--outline) solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, #ff7b74 0%, var(--red) 45%, var(--red-deep) 100%);
  box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.35);
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white);
  paint-order: stroke fill;
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 0 2px 0 var(--ink);
}
.ribbon::before,
.ribbon::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 24px;
  height: calc(100% - 6px);
  background: var(--red-deep);
  border: var(--outline) solid var(--ink);
  z-index: -1;
}
.ribbon::before {
  left: -18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%);
}
.ribbon::after {
  right: -18px;
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%);
}
html[lang="az"] .ribbon,
html[lang="tr"] .ribbon,
html[lang="ru"] .ribbon {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 var(--ink);
}
.chip--gold {
  background: var(--gold);
  color: var(--ink);
}
.chip--green {
  background: var(--green);
}
.chip--orange {
  background: var(--orange);
}
.chip--blue {
  background: var(--blue);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 26, 56, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}
.site-header__logo img {
  width: 112px;
}
.site-nav {
  display: none;
  gap: 4px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 150ms ease;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}
@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-switch select {
  appearance: none;
  min-height: 44px;
  padding: 0 36px 0 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.lang-switch::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  transform: translateY(-3px) rotate(45deg);
  pointer-events: none;
}
.site-header .btn {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 1rem;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
.site-header .btn:active {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 1px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
.site-header .btn--header {
  display: none;
}
@media (min-width: 560px) {
  .site-header .btn--header {
    display: inline-flex;
  }
}

/* ---------- Sky scene (hero + simple pages) ---------- */
.scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
}
.scene__layer {
  position: absolute;
  inset: auto 0 0 0;
  height: min(100%, 640px);
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
  pointer-events: none;
  z-index: -1;
}
.scene__layer--clouds {
  background-image: url("../assets/img/backdrop/1_clouds.webp");
  width: 200%;
  left: 0;
  animation: drift 90s linear infinite;
}
.scene__layer--far {
  background-image: url("../assets/img/backdrop/2_far.webp");
}
.scene__layer--mid {
  background-image: url("../assets/img/backdrop/3_mid.webp");
}
.scene__layer--near {
  background-image: url("../assets/img/backdrop/4_near.webp");
}
.scene__layer--ground {
  background-image: url("../assets/img/backdrop/5_ground.webp");
}
@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(80px, 12vw, 140px);
}
.hero__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 48px;
  }
}
.hero__copy {
  position: relative;
  text-align: center;
}
/* Soft cloud-bank haze so the copy always sits on clean sky, whatever the skyline height. */
.hero__copy::before {
  content: "";
  position: absolute;
  inset: -40px -40px -24px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 42%, rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0) 76%);
  pointer-events: none;
}
@media (min-width: 900px) {
  .hero__copy::before {
    inset: -60px -80px -40px -120px;
  }
  .hero .scene__layer--clouds {
    left: 54%;
    width: 120%;
  }
  .hero .scene__layer--far,
  .hero .scene__layer--mid,
  .hero .scene__layer--near,
  .hero .scene__layer--ground {
    height: min(100%, 520px);
  }
}
@media (min-width: 900px) {
  .hero__copy {
    text-align: left;
  }
}
.hero__logo {
  width: min(440px, 86%);
  margin: 0 auto 20px;
}
@media (min-width: 900px) {
  .hero__logo {
    margin-inline: 0;
  }
}
.hero__tagline {
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  margin-bottom: 14px;
  text-wrap: balance;
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--ink);
  max-width: 34rem;
  margin-inline: auto;
}
@media (min-width: 900px) {
  .hero__lead {
    margin-inline: 0;
  }
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}
@media (min-width: 900px) {
  .hero__actions {
    justify-content: flex-start;
  }
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .hero__facts {
    justify-content: flex-start;
  }
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 var(--ink);
}
.hero__facts img {
  width: 26px;
  height: 26px;
}

/* Phone frame: landscape bezel around a real screenshot. */
.phone {
  position: relative;
  margin-inline: auto;
  width: min(100%, 640px);
  border: 4px solid var(--ink);
  border-radius: 34px;
  background: var(--ink);
  padding: 12px;
  box-shadow: 0 14px 0 var(--navy-deep), 0 30px 40px -20px rgba(27, 35, 71, 0.5);
}
.phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 90px;
  height: 20px;
  margin-left: -45px;
  border-radius: 0 0 12px 12px;
  background: var(--ink);
  z-index: 2;
}
.phone__screen {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2868 / 1320;
  background: var(--navy);
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone--centered {
  margin-top: 28px;
  width: min(100%, 720px);
}
.phone--board .phone__screen {
  background: url("../assets/img/board.webp") center / cover no-repeat;
}

.hero__stage {
  position: relative;
}
.floaty {
  position: absolute;
  width: clamp(48px, 7vw, 84px);
  pointer-events: none;
  filter: drop-shadow(0 8px 0 rgba(27, 35, 71, 0.25));
  z-index: 3;
}
.floaty--die-a {
  left: -4%;
  top: -8%;
  animation: bounce 2.4s var(--ease-in-out) infinite;
}
.floaty--die-b {
  right: -3%;
  bottom: -10%;
  animation: bounce 2.9s var(--ease-in-out) infinite 0.6s;
}
.floaty--coin-a {
  right: 6%;
  top: -14%;
  width: clamp(40px, 5vw, 64px);
  animation: hover-float 3.4s ease-in-out infinite 0.2s;
}
.floaty--coin-b {
  left: 10%;
  bottom: -12%;
  width: clamp(34px, 4vw, 52px);
  animation: hover-float 3s ease-in-out infinite 1.1s;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-22px) rotate(10deg);
  }
}
@keyframes hover-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(12deg);
  }
}

/* Page-load pop: logo, text, buttons, phone in sequence. */
.pop {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  animation: pop 700ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 110ms);
}
@keyframes pop {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Dark street sections ---------- */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--navy-deep);
  position: relative;
}
.section--street {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(59, 139, 234, 0.22), transparent 70%),
    var(--navy-deep);
}
.section--alt {
  background: #1a2150;
}
.section__head {
  position: relative;
  isolation: isolate;
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 48px);
}
.section__head p {
  max-width: 40rem;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 22px;
  align-items: start;
}
.grid--stretch {
  align-items: stretch;
}
.grid--heroes,
.grid--corners {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 760px) {
  .grid--heroes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}
@media (min-width: 900px) {
  .grid--corners {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}
.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--outline) solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  box-shadow: 0 3px 0 var(--ink);
}
.step h3 {
  font-size: 1.4rem;
}
.step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.step__art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  margin-top: 4px;
}
.step__art img {
  height: 96px;
  width: auto;
}
.step__art--dice img {
  height: 76px;
  animation: bounce 2.6s var(--ease-in-out) infinite;
}
.step__art--dice img:nth-child(2) {
  animation-delay: 0.5s;
}
.step__art--tiles img {
  height: 110px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--ink);
}
.step__art--tiles img:nth-child(2) {
  transform: translateY(-10px) rotate(4deg);
}
.step__art--tiles img:nth-child(3) {
  transform: rotate(-4deg);
}

/* Build ladder: lot → houses → hotel → landmark. */
.ladder {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 28px;
}
.ladder__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.ladder__step img {
  height: clamp(56px, 9vw, 120px);
  width: auto;
  object-fit: contain;
}
.ladder__step span {
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.6vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--white);
}
.ladder__step--landmark span {
  color: var(--gold);
}
.ladder__step--landmark img {
  filter: drop-shadow(0 0 14px rgba(255, 212, 71, 0.75));
}

.win-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.win-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}
.win-list img {
  width: 40px;
  height: 40px;
  flex: none;
}
.win-list strong {
  color: var(--gold);
}

/* Modes */
.mode {
  display: grid;
  gap: 18px;
}
.mode h3 {
  font-size: 1.6rem;
}
.mode p {
  font-weight: 600;
  margin: 0;
}
.mode__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.mode__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600;
}
.mode__list li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ink);
}
.code-sample {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: var(--outline) solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: 0.18em;
  box-shadow: 0 4px 0 var(--ink);
}
.code-sample small {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--blue-deep);
}

/* Heroes */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 50px 12px 18px;
  text-align: center;
  overflow: hidden;
}
.hero-card__art {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-card__art img {
  max-height: 100%;
  width: auto;
  transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .hero-card:hover .hero-card__art img {
    transform: translateY(-6px) scale(1.04);
  }
}
.hero-card h3 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
}
.hero-card p {
  margin: 0;
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.hero-card .chip {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}
.hero-card--starter {
  background: linear-gradient(180deg, #7cbcff 0%, #4a9bf0 45%, var(--blue-deep) 100%);
}
.hero-card__art--pack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.hero-card__art--pack img {
  width: 38%;
  height: auto;
  margin-inline: -4%;
  transform: rotate(-12deg);
}
.hero-card__art--pack img:nth-child(2) {
  transform: translateY(-14px) scale(1.15);
  z-index: 1;
}
.hero-card__art--pack img:nth-child(3) {
  transform: rotate(12deg);
}
.hero-card__pedestal {
  position: absolute;
  bottom: 86px;
  left: 50%;
  width: 70%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gold);
  border: var(--outline) solid var(--ink);
  z-index: 0;
}
.hero-card__art,
.hero-card h3,
.hero-card p {
  position: relative;
  z-index: 1;
}

/* Dice grid */
.dice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
}
@media (min-width: 1000px) {
  .dice-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}
.dice-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: var(--outline) solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, #4a9bf0, var(--blue-deep));
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 200ms var(--ease-out);
}
.dice-grid figure.is-legendary {
  background: linear-gradient(180deg, #b48bff, var(--purple-deep));
}
@media (hover: hover) and (pointer: fine) {
  .dice-grid figure:hover {
    transform: translateY(-4px) rotate(-3deg);
  }
}
.dice-grid img {
  width: 64px;
  height: 64px;
}
.dice-grid figcaption {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fair-dice {
  display: grid;
  gap: 16px;
  align-items: center;
  grid-template-columns: auto 1fr;
}
.fair-dice img {
  width: 72px;
}
.fair-dice p {
  margin: 0;
  font-weight: 600;
}
.fair-dice strong {
  color: var(--gold);
}

/* Corners */
.corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px 12px 18px;
}
.corner__art {
  height: clamp(120px, 30vw, 170px);
  display: grid;
  place-items: center;
}
.corner__art img {
  max-height: 100%;
  width: auto;
}
.corner__art--teleport img {
  animation: hover-float 3.2s ease-in-out infinite;
}
.corner__art--start {
  position: relative;
}
.corner h3 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
}
.corner p {
  margin: 0;
  font-weight: 600;
  font-size: clamp(0.88rem, 2.3vw, 1rem);
}
.start-tile {
  width: clamp(100px, 24vw, 150px);
  height: clamp(100px, 24vw, 150px);
  border: var(--outline) solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(180deg, #8ee86a, var(--green-deep));
  box-shadow: 0 6px 0 var(--ink);
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.start-tile span {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--white);
  paint-order: stroke fill;
  -webkit-text-stroke: 3px var(--ink);
  letter-spacing: 0.05em;
}
.start-tile svg {
  width: 44%;
  height: 44%;
}

/* Achievements and leagues */
.ach-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ach-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
}
.ach-list img {
  width: 48px;
  height: 48px;
}
.ach-list h4 {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ach-list p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.ach-list .reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--gold-light);
}
.ach-list .reward img {
  width: 28px;
  height: 28px;
}
.leagues {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.league {
  --tone: #b8c3e6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border: var(--outline) solid var(--ink);
  border-radius: 16px;
  background: var(--navy);
  box-shadow: 0 4px 0 var(--ink);
  text-align: center;
}
.league__badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--outline) solid var(--ink);
  background: var(--tone);
  display: grid;
  place-items: center;
}
.league__badge svg {
  width: 24px;
  height: 24px;
}
.league span {
  font-family: var(--display);
  font-size: clamp(0.65rem, 1.6vw, 0.9rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.league--rookie {
  --tone: #c9d2ec;
}
.league--city {
  --tone: #6eb6ff;
}
.league--tycoon {
  --tone: var(--gold);
}
.league--millionaire {
  --tone: #ff6ad5;
}
.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
}
.daily-grid article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  text-align: center;
  border: var(--outline) solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, #7cbcff, #3b8bea);
  box-shadow: 0 4px 0 var(--ink);
}
.daily-grid img {
  width: 52px;
  height: 52px;
}
.daily-grid h4 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.daily-grid p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Gallery */
.gallery {
  display: grid;
  gap: 20px;
}
.gallery__thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}
.gallery__thumbs button {
  width: 116px;
  padding: 0;
  border: var(--outline) solid var(--ink);
  border-radius: 12px;
  background: var(--navy);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.gallery__thumbs button[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 0 3px 0 var(--ink);
}
.gallery__thumbs img {
  aspect-ratio: 2868 / 1320;
  object-fit: cover;
  width: 100%;
}
.gallery__thumbs span {
  display: block;
  padding: 6px 4px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
}
.gallery__caption {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  min-height: 1.6em;
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-inline: auto;
}
.faq details {
  border: var(--outline) solid var(--ink);
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 0 var(--navy-deep);
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease-out);
  margin-right: 4px;
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
}
.faq summary:focus-visible {
  outline-offset: -4px;
}
.faq .faq__body {
  padding: 0 20px 18px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.faq .faq__body p:last-child {
  margin: 0;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: clamp(48px, 8vw, 90px) 0;
  background: linear-gradient(180deg, var(--navy-deep) 0%, #0f1430 100%);
}
.cta-band .display {
  font-size: clamp(1.8rem, 5vw, 3rem);
}
.cta-band .hero__actions {
  justify-content: center;
}

/* Footer */
.site-footer {
  background: #0d1128;
  border-top: 3px solid var(--ink);
  padding: 36px 0 44px;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer__inner {
  display: grid;
  gap: 20px;
  align-items: center;
}
@media (min-width: 760px) {
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
  }
}
.site-footer__logo img {
  width: 120px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  border-radius: 10px;
}
.site-footer__links a:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: underline;
}
.site-footer__meta {
  margin: 0;
}

/* ---------- Simple pages: legal, support, room, 404 ---------- */
.page {
  padding: clamp(32px, 6vw, 64px) 0 clamp(64px, 10vw, 120px);
}
.page__head {
  position: relative;
  isolation: isolate;
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.page__head p {
  color: var(--ink);
  font-weight: 700;
  margin: 16px auto 0;
  max-width: 36rem;
  text-shadow: 0 0 6px #fff, 0 0 14px #fff, 0 0 24px #fff;
}
.scene p.on-sky {
  text-shadow: 0 0 6px #fff, 0 0 14px #fff, 0 0 24px #fff;
}
.prose {
  max-width: 760px;
  margin-inline: auto;
  color: var(--ink);
  font-size: 1.05rem;
}
.prose h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 1.6em 0 0.6em;
}
html[lang="az"] .prose h2,
html[lang="tr"] .prose h2,
html[lang="ru"] .prose h2 {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
}
.prose a {
  color: var(--blue-deep);
  font-weight: 800;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose .version {
  font-weight: 800;
  color: var(--blue-deep);
}

.form {
  display: grid;
  gap: 18px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-weight: 800;
  color: var(--white);
}
.field__hint {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: var(--outline) solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 3px 0 rgba(27, 35, 71, 0.12);
}
.field textarea {
  min-height: 160px;
  resize: vertical;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline-color: var(--gold);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 65, 58, 0.35);
}
.field__error {
  min-height: 1.3em;
  color: var(--bad);
  font-weight: 800;
  font-size: 0.92rem;
}
.field__error:empty {
  display: none;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form__status {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: var(--outline) solid var(--ink);
  border-radius: 14px;
  font-weight: 800;
}
.form__status.is-visible {
  display: flex;
}
.form__status--success {
  background: var(--green);
  color: var(--white);
}
.form__status--error {
  background: var(--red);
  color: var(--white);
}
.form__status img {
  width: 32px;
  height: 32px;
}
.btn .spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(27, 35, 71, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
.btn.is-loading .spinner {
  display: inline-block;
}
.btn.is-loading .btn__label {
  opacity: 0.7;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.contact-card {
  display: grid;
  gap: 14px;
  align-content: start;
}
.contact-card h2 {
  font-size: 1.5rem;
}
.contact-card p {
  margin: 0;
  font-weight: 600;
}
.contact-card a.mail {
  font-weight: 800;
  font-size: 1.1rem;
  word-break: break-all;
}
.support-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 900px) {
  .support-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

/* Room invite */
.invite {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}
.invite__code {
  display: inline-flex;
  gap: 8px;
  margin: 18px 0 10px;
}
.invite__code span {
  display: grid;
  place-items: center;
  width: clamp(48px, 13vw, 68px);
  height: clamp(60px, 16vw, 84px);
  border: var(--outline) solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  box-shadow: 0 5px 0 var(--ink);
}
.invite__actions {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.invite__avatars {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.invite__avatars img {
  width: 72px;
  height: 72px;
  border: var(--outline) solid var(--ink);
  border-radius: 20px;
  background: var(--blue);
  margin-inline: -10px;
  box-shadow: 0 4px 0 var(--ink);
}
.invite__avatars img:nth-child(2) {
  transform: translateY(-10px);
  z-index: 1;
}
.invite__hint {
  margin: 14px 0 0;
  font-weight: 700;
  color: var(--muted);
}
.invite--invalid .invite__code span {
  background: #ffd9d7;
}

.not-found {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) 0;
}
.not-found__art {
  width: min(260px, 60%);
  margin: 0 auto 20px;
}
.not-found .display {
  font-size: clamp(2.2rem, 8vw, 4rem);
}

/* ---------- Scroll reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scene__layer--clouds,
  .floaty,
  .step__art--dice img,
  .corner__art--teleport img {
    animation: none;
  }
  .pop {
    animation: fade 300ms ease forwards;
    transform: none;
  }
  html.js .reveal {
    transform: none;
    transition: opacity 300ms ease;
  }
  .btn,
  .dice-grid figure,
  .hero-card__art img {
    transition: none;
  }
  @keyframes fade {
    to {
      opacity: 1;
    }
  }
}
