/* Nib-a-Bin promo site. Same cartoon look as the game: chunky ink outlines,
   bright sky-to-grass colours, rounded cards with a hard drop shadow. */
:root {
  --ink: #1d2b16;
  --sky: #aee9f5;
  --meadow: #cdeac0;
  --grass: #9ad67f;
  --green: #57cc5b;
  --green-d: #2b9348;
  --gold: #ffd23f;
  --orange: #f4a259;
  --pink: #ef626c;
  --purple: #9b6bbd;
  --paper: #fffdf6;
  --shadow: 0 10px 0 rgba(29, 43, 22, 0.18);
  --radius: 28px;
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Baloo 2", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0%, var(--meadow) 46%, var(--grass) 100%) fixed;
  background-color: var(--meadow);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-d); font-weight: 800; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(174, 233, 245, 0.72);
  border-bottom: 3px solid rgba(29, 43, 22, 0.12);
}
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 22px; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 40px; }
.top .spacer { flex: 1; }
.top nav a { text-decoration: none; color: var(--ink); font-weight: 800; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: rgba(255, 255, 255, 0.6); }
.langpick { position: relative; }
.langpick select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-weight: 800; font-size: 15px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 999px;
  padding: 7px 34px 7px 14px; cursor: pointer; max-width: 180px;
  box-shadow: 0 4px 0 rgba(29, 43, 22, 0.18);
}
[dir="rtl"] .langpick select { padding: 7px 14px 7px 34px; }
.langpick::after {
  content: "▾"; position: absolute; inset-inline-end: 13px; top: 50%; transform: translateY(-52%);
  pointer-events: none; font-size: 14px;
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 {
  margin: 0; font-size: clamp(52px, 9vw, 104px); line-height: 0.92; font-weight: 900; letter-spacing: -0.03em;
  color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 7px 0 var(--ink);
}
.hero .tag { margin: 22px 0 10px; font-size: clamp(22px, 3.2vw, 32px); font-weight: 900; line-height: 1.15; }
.hero .sub { margin: 0 0 28px; font-size: 18px; max-width: 34em; opacity: 0.85; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 18px; padding: 10px 20px 10px 14px; min-width: 200px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
[dir="rtl"] .store { padding: 10px 14px 10px 20px; }
.store svg { width: 30px; height: 30px; flex: none; }
.store .lbl { display: flex; flex-direction: column; line-height: 1.1; }
.store .lbl small { font-size: 12px; font-weight: 700; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }
.store .lbl b { font-size: 20px; font-weight: 900; }
.store.soon { cursor: default; }
.store:not(.soon):hover { transform: translateY(-2px); }
.facts { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts span {
  font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(29, 43, 22, 0.15); border-radius: 999px; padding: 4px 12px;
}

/* ---------- Phone with a live mini board ---------- */
.phone {
  position: relative; justify-self: center;
  width: min(340px, 82vw); aspect-ratio: 9 / 19.2;
  background: var(--ink); border-radius: 52px; padding: 12px;
  box-shadow: 0 24px 0 rgba(29, 43, 22, 0.2), 0 40px 80px rgba(29, 43, 22, 0.25);
  transform: rotate(3deg);
}
[dir="rtl"] .phone { transform: rotate(-3deg); }
.phone .screen {
  position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden;
  background: linear-gradient(180deg, #aee9f5 0%, #cdeac0 50%, #9ad67f 100%);
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }
.phone .notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 34%; height: 26px; background: var(--ink); border-radius: 999px; z-index: 3; }
.hud { position: absolute; top: 60px; inset-inline: 18px; display: flex; justify-content: space-between; align-items: center; z-index: 2; font-weight: 900; }
.hud .pill { background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 18px; }
.board { position: absolute; inset: 110px 14px 26px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
.cell { position: relative; }
.cell .hole {
  position: absolute; left: 10%; right: 10%; bottom: 14%; height: 22%;
  background: #4a3422; border-radius: 50%; box-shadow: 0 3px 0 rgba(60, 40, 25, 0.3);
}
.cell .bin {
  position: absolute; left: 18%; right: 18%; bottom: 22%; height: 72%;
  clip-path: inset(-40% -20% 0 -20%);
}
.cell .bin svg {
  width: 100%; height: 100%;
  transform: translateY(105%);
  animation: pop var(--dur, 2.4s) var(--delay, 0s) infinite ease-in-out;
}
@keyframes pop {
  0%, 18% { transform: translateY(105%); }
  30%, 62% { transform: translateY(0); }
  74%, 100% { transform: translateY(105%); }
}
.float {
  position: absolute; font-weight: 900; font-size: 20px; color: var(--green-d);
  -webkit-text-stroke: 1px #fff; pointer-events: none; animation: rise 1.1s ease-out forwards; z-index: 4;
}
@keyframes rise { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-46px) scale(1.25); } }

/* ---------- Sections ---------- */
section { padding: 44px 0; }
h2 {
  margin: 0 0 22px; font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05;
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 24px;
}
.card .ico { width: 70px; height: 82px; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-size: 23px; font-weight: 900; line-height: 1.15; }
.card p { margin: 0; font-size: 17px; opacity: 0.85; }

.pows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pow {
  display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, 0.8);
  border: 3px solid var(--ink); border-radius: 22px; padding: 10px 16px 10px 10px;
  box-shadow: 0 6px 0 rgba(29, 43, 22, 0.14);
}
[dir="rtl"] .pow { padding: 10px 10px 10px 16px; }
.pow > [data-bin] { display: block; width: 48px; height: 57px; flex: none; }
.pow svg { width: 100%; height: 100%; }
.pow b { display: block; font-size: 18px; font-weight: 900; line-height: 1.15; }
.pow span { font-size: 15px; opacity: 0.8; }

.claw {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center;
  background: linear-gradient(135deg, #ff5fb0 0%, #8a5cff 100%); color: #fff;
  border: 4px solid var(--ink); border-radius: 36px; padding: 34px; box-shadow: var(--shadow);
}
.claw h2 { color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.claw p { font-size: 19px; margin: 0; }
.prizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prize {
  aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(30px, 4.6vw, 46px);
  background: rgba(255, 255, 255, 0.22); border: 3px solid rgba(255, 255, 255, 0.55); border-radius: 20px;
  animation: bob 3s ease-in-out infinite;
}
.prize.rare { background: rgba(255, 210, 63, 0.4); border-color: var(--gold); }
.prize.legend { background: rgba(179, 136, 255, 0.5); border-color: #e5d4ff; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.shots img {
  width: 100%; height: auto; border: 6px solid var(--ink); border-radius: 34px;
  box-shadow: var(--shadow); background: var(--sky);
}
.shots img:nth-child(2) { transform: translateY(18px); }
@media (max-width: 880px) {
  .shots { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 26px; }
  .shots img { scroll-snap-align: center; }
  .shots img:nth-child(2) { transform: none; }
}

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan.plus { background: linear-gradient(180deg, #fff6d6 0%, var(--paper) 60%); }
.chip {
  font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px;
}
.langs { text-align: center; }
.langs p { font-size: 19px; margin: 0 auto 18px; max-width: 34em; }
.flags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.flags button {
  font: inherit; font-weight: 800; font-size: 15px; color: var(--ink); cursor: pointer;
  background: rgba(255, 255, 255, 0.75); border: 2px solid rgba(29, 43, 22, 0.2); border-radius: 999px; padding: 5px 14px;
}
.flags button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Support page ---------- */
.page { padding: 46px 0 30px; }
.page .card { max-width: 760px; margin: 0 auto; }
.page h1 { margin: 0 0 10px; font-size: clamp(38px, 6vw, 60px); font-weight: 900; letter-spacing: -0.02em; }
.mail {
  display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 6px;
  background: var(--green); color: #fff; text-decoration: none; font-size: 20px; font-weight: 900;
  border: 3px solid var(--ink); border-radius: 999px; padding: 10px 22px; box-shadow: 0 6px 0 rgba(29, 43, 22, 0.2);
  word-break: break-all;
}
.faq { margin-top: 26px; }
.faq h2 { font-size: 28px; margin-bottom: 12px; }
.faq details { border-top: 3px dashed rgba(29, 43, 22, 0.2); padding: 12px 0; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 900; }
.faq p { margin: 8px 0 0; font-size: 17px; opacity: 0.85; }

/* ---------- Footer ---------- */
footer { padding: 34px 0 44px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; font-weight: 800; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .ver { opacity: 0.5; font-size: 13px; font-weight: 700; }
footer .spacer { flex: 1; }

/* ---------- Phone width ---------- */
@media (max-width: 880px) {
  .hero { padding-top: 34px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .cards, .plans { grid-template-columns: 1fr; }
  .claw { grid-template-columns: 1fr; padding: 24px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .brand span:not([data-bin]) { display: none; }
  .store { min-width: 0; flex: 1 1 160px; }
  .top nav a { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cell .bin svg, .prize, .float { animation: none; }
  .cell .bin svg { transform: translateY(0); }
}
