/* STEAL A FURNITURE! — stealafurniture.coldter.com
   The game's look: studded bricks, a terracotta hall wall, sky, grass, chunky FredokaOne words with a thick
   plum outline (the game's Label style), the red RUN!! pill, rarity colours from Config.Rarity. */

@font-face { font-family: "Fredoka One"; src: url("../fonts/fredoka.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mitr"; src: url("../fonts/mitr-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mitr"; src: url("../fonts/mitr-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mitr"; src: url("../fonts/mitr-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --plum: #28163a;
  --plum-2: #3d2457;
  --ink: #2a1d38;
  --sky: #5ab9f2;
  --sky-2: #a8e0ff;
  --brick: #c7682f;
  --brick-2: #a8521f;
  --grass: #5cc531;
  --grass-2: #3f9e1d;
  --cream: #fff8ec;
  --gold: #ffd23a;
  --orange: #ff8a14;
  --red: #e62d2d;
  --red-2: #a3141c;
  --green: #35c84a;
  --green-2: #1f8f2e;
  --common: #ebebeb;
  --uncommon: #5ae15a;
  --rare: #46a5ff;
  --epic: #be64ff;
  --legendary: #ffcd28;
  --word: "Fredoka One", "Mitr", system-ui, sans-serif;
  --body: "Mitr", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  --edge: 4px solid var(--plum);
  --lift: 0 6px 0 var(--plum);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #160a22; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--brick);
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* one language at a time (js/lang.js sets html[data-lang]) */
html[data-lang="th"] body [lang="en"],
html[data-lang="en"] body [lang="th"] { display: none !important; }

/* studs: the LEGO baseplate texture on every surface */
.studs {
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .22) 0 26%, transparent 29%),
    radial-gradient(circle at 50% 56%, rgba(0, 0, 0, .16) 0 28%, transparent 31%);
  background-size: 24px 24px;
}

/* the genre's in-game words: chunky, white, thick plum outline, a little 3D underneath */
.word {
  font-family: var(--word);
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
  line-height: 1.02;
  -webkit-text-stroke: .16em var(--plum);
  paint-order: stroke fill;
  text-shadow: 0 .1em 0 var(--plum), 0 .16em .22em rgba(20, 8, 30, .35);
}
.word--gold { color: var(--gold); }
.word--red { color: #ff5a4f; }
.word--green { color: #7dff6a; }
.word--blue { color: #8fd2ff; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: rgba(40, 22, 58, .92);
  backdrop-filter: blur(8px);
  border-bottom: 4px solid #160a22;
}
.bar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.bar .brand img { width: 40px; height: 40px; border-radius: 10px; border: 3px solid #fff; }
.bar .brand span { font-size: 21px; white-space: nowrap; -webkit-text-stroke-width: .14em; }
.bar .sp { flex: 1; }
.langs { display: flex; background: #160a22; border-radius: 999px; padding: 3px; }
.langs button {
  font: 500 14px var(--body); color: #cdbfe0; background: none; border: 0; cursor: pointer;
  padding: 5px 11px; border-radius: 999px;
}
html[data-lang="th"] .langs [data-l="th"], html[data-lang="en"] .langs [data-l="en"] { background: #fff; color: var(--plum); }

/* ---------- the green PLAY button (Roblox green, chunky) ---------- */
.play {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font-family: var(--word); font-weight: 700; font-size: 24px; color: #fff; text-decoration: none;
  padding: .55em 1.15em .6em;
  background: linear-gradient(#56e06a, var(--green) 55%, #2bb23e);
  border: var(--edge); border-radius: 16px;
  box-shadow: 0 6px 0 var(--green-2), 0 6px 0 4px var(--plum), 0 14px 24px rgba(20, 8, 30, .35);
  -webkit-text-stroke: .12em var(--plum); paint-order: stroke fill;
  transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.play::before {
  content: ""; width: .8em; height: .9em; flex: none;
  background: #fff; clip-path: polygon(8% 0, 100% 50%, 8% 100%);
  filter: drop-shadow(0 0 0 var(--plum));
}
.play:hover { transform: translateY(-2px); }
.play:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--green-2), 0 1px 0 4px var(--plum), 0 4px 10px rgba(20, 8, 30, .35); }
.play--sm { font-size: 16px; border-width: 3px; border-radius: 12px; padding: .5em .9em; box-shadow: 0 4px 0 var(--green-2), 0 4px 0 3px var(--plum); }
.play--sm:active { box-shadow: 0 1px 0 var(--green-2), 0 1px 0 3px var(--plum); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(680px, 88vh);
  display: flex; align-items: center;
  background: #5ab9f2 url("../img/hero.webp") 100% 50% / cover no-repeat;
  border-bottom: 6px solid var(--plum);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(24, 12, 40, .78) 0%, rgba(24, 12, 40, .5) 34%, rgba(24, 12, 40, 0) 58%);
}
.hero .wrap { padding: 56px 0 72px; }
.hero .copy { max-width: 500px; }
.hero .logo { width: min(520px, 100%); margin: 0 0 18px -8px; filter: drop-shadow(0 10px 18px rgba(10, 4, 20, .4)); }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); margin: 0 0 12px; }
.hero p.lead {
  font-size: clamp(16px, 1.8vw, 19px); color: #fff; margin: 0 0 26px; max-width: 30em;
  text-shadow: 0 2px 6px rgba(10, 4, 20, .7);
}
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero .free { color: #fff; font-size: 15px; text-shadow: 0 2px 6px rgba(10, 4, 20, .8); }
.hero .run {
  position: absolute; right: 7%; top: 9%; width: clamp(130px, 17vw, 240px);
  animation: wobble 1.6s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(10, 4, 20, .35));
}
@keyframes wobble { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.06); } }

/* ---------- stat strip ---------- */
.stats { background: var(--plum); color: #fff; border-bottom: 6px solid #160a22; }
.stats ul {
  list-style: none; margin: 0 auto; padding: 16px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center;
}
.stats b { display: block; font-size: clamp(28px, 4vw, 42px); }
.stats span { font-size: 14px; color: #d9cbee; }

/* ---------- sections ---------- */
.sec { position: relative; padding: 76px 0 84px; }
.sec--grass { background-color: var(--grass); border-top: 6px solid var(--grass-2); }
.sec--wall { background-color: var(--brick); border-top: 6px solid var(--brick-2); }
.sec--sky { background: linear-gradient(var(--sky), var(--sky-2)); border-top: 6px solid #2f8fcc; }
.sec h2 { font-size: clamp(36px, 6vw, 64px); text-align: center; margin: 0 0 10px; }
.sec .sub {
  text-align: center; max-width: 40em; margin: 0 auto 44px; font-size: 18px; font-weight: 500;
  color: #fff; text-shadow: 0 2px 0 rgba(40, 22, 58, .55);
}

/* chunky panel, like the game's UI cards */
.panel {
  background: var(--cream); border: var(--edge); border-radius: var(--r);
  box-shadow: var(--lift), 0 16px 28px rgba(20, 8, 30, .25);
}

/* ---------- how to steal ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 18px 16px 20px; display: flex; flex-direction: column; }
.step .art { height: 150px; display: flex; align-items: flex-end; justify-content: center; margin: -54px 0 10px; }
.step .art img { max-height: 170px; width: auto; filter: drop-shadow(0 8px 8px rgba(20, 8, 30, .25)); }
.step .n {
  position: absolute; top: -18px; left: -14px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px;
  background: var(--red); border: var(--edge); box-shadow: 0 4px 0 var(--plum);
}
.step h3 { font-size: 27px; margin: 0 0 8px; text-align: center; }
.step p { margin: 0; font-size: 15.5px; }
.step .tag {
  display: inline-block; font-family: var(--word); font-size: 15px; color: #fff; background: var(--plum);
  padding: 1px 9px 3px; border-radius: 8px; white-space: nowrap;
}
.loopback {
  margin: 34px auto 0; width: fit-content; max-width: 100%; text-align: center;
  font-size: clamp(22px, 3.4vw, 34px);
}

/* ---------- layers ---------- */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -18px 0 40px; }
.hall {
  display: flex; align-items: center; gap: 14px; margin: 46px 0 22px;
  font-size: clamp(22px, 3vw, 30px);
}
.hall::after { content: ""; flex: 1; height: 6px; border-radius: 3px; background: rgba(40, 22, 58, .45); }
.hall small { font-family: var(--body); font-size: 15px; font-weight: 500; color: #fff; -webkit-text-stroke: 0; text-shadow: none; opacity: .9; }
.layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.layer { overflow: hidden; display: flex; flex-direction: column; }
.layer .pic { position: relative; aspect-ratio: 16 / 9; background: #9cc9e6; border-bottom: var(--edge); }
.layer .pic img { width: 100%; height: 100%; object-fit: cover; }
.layer .num {
  position: absolute; left: 10px; top: 10px; min-width: 50px; height: 50px; padding: 0 8px;
  display: grid; place-items: center; font-size: 28px;
  background: var(--gold); border: var(--edge); border-radius: 14px; box-shadow: 0 4px 0 var(--plum);
  -webkit-text-stroke-width: .13em;
}
.layer .boss {
  position: absolute; right: 10px; bottom: 10px; font-size: 13px; font-weight: 500; color: #fff;
  background: rgba(40, 22, 58, .85); padding: 3px 10px; border-radius: 999px;
}
.layer .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.layer h3 { margin: 0; font-size: 26px; }
.layer h3 .th { display: block; font-family: var(--body); font-size: 15px; font-weight: 500; color: #7a6a8c; -webkit-text-stroke: 0; text-shadow: none; margin-top: 2px; }
.layer p { margin: 0; font-size: 15.5px; }
.layer .words { display: flex; flex-wrap: wrap; gap: 6px; }
.layer .words span {
  font-family: var(--word); font-size: 15px; color: #fff; background: var(--red); padding: 2px 10px 4px;
  border: 3px solid var(--plum); border-radius: 10px; transform: rotate(-2deg);
}
.layer .words span:nth-child(2n) { transform: rotate(2deg); }
.loot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.chip {
  font-size: 13px; font-weight: 500; line-height: 1; padding: 6px 10px 7px; border-radius: 999px;
  border: 2.5px solid var(--plum); background: var(--common); color: var(--plum); white-space: nowrap;
}
.chip.u { background: var(--uncommon); }
.chip.r { background: var(--rare); color: #fff; }
.chip.e { background: var(--epic); color: #fff; }
.chip.l { background: var(--legendary); }
.chip.l::before { content: "★ "; }
.layer--last { border-color: #160a22; background: linear-gradient(#fff6e2, #f3e6ff); }
.layer--last .num { background: var(--epic); }

/* the odd card out (7 in the front hall) lies across the whole row on wide screens */
@media (min-width: 701px) {
  .layer--wide { grid-column: 1 / -1; flex-direction: row; }
  .layer--wide .pic { flex: 0 0 58%; border-bottom: 0; border-right: var(--edge); }
  .layer--wide .body { justify-content: center; padding: 22px 26px; }
  .layer--wide .loot { margin-top: 4px; }
}

/* ---------- gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shots figure { margin: 0; overflow: hidden; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { padding: 10px 14px 12px; font-size: 15px; font-weight: 500; }

/* ---------- final call ---------- */
.final { text-align: center; }
.final .icon { width: 150px; margin: 0 auto 18px; border-radius: 30px; border: 5px solid #fff; box-shadow: 0 0 0 4px var(--plum), 0 12px 24px rgba(20, 8, 30, .35); }
.final h2 { margin-bottom: 26px; }
.final .by { margin-top: 18px; color: #fff; font-weight: 500; text-shadow: 0 2px 0 rgba(40, 22, 58, .5); }

footer {
  background: #160a22; color: #b9a8cf; font-size: 14px; text-align: center; padding: 26px 16px 34px;
}
footer a { color: #fff; }
footer p { margin: 4px 0; }

/* ---------- small screens ---------- */
@media (max-width: 1060px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 70px; }
  .step:last-child { grid-column: 1 / -1; max-width: 520px; justify-self: center; }
  .shots { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .bar .brand span { display: none; }
  .hero { min-height: auto; background-position: 74% 50%; align-items: flex-end; }
  .hero::before { background: linear-gradient(180deg, rgba(24, 12, 40, .1) 0%, rgba(24, 12, 40, .55) 45%, rgba(24, 12, 40, .88) 100%); }
  .hero .wrap { padding: 210px 0 40px; }
  .hero .run { right: 4%; top: 4%; }
  .stats ul { grid-template-columns: repeat(2, 1fr); }
  .sec { padding: 60px 0 66px; }
  .steps { grid-template-columns: 1fr; }
  .step:last-child { max-width: none; }
  .layers { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .play { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .run { animation: none; }
  html { scroll-behavior: auto; }
}
