/* =============================================================================
   The LingoBlox look: colour-coded blocks, chunky buttons, the wordmark and the
   robot. Shared by the little game in the homepage's box and by the LingoBlox page.
   The colours are the ones playlingoblox.com uses.
   ============================================================================= */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}

.lb {
  --lb-blue: #1e90ff;   --lb-blue-d: #0959a8;
  --lb-red: #ff4757;    --lb-red-d: #b81220;
  --lb-green: #22bf66;  --lb-green-d: #128a45;
  --lb-orange: #ff9f0a; --lb-orange-d: #b07202;
  --lb-purple: #9b59b6; --lb-purple-d: #622f77;
  --lb-navy: #252c41;   --lb-navy-deep: #1a2135; --lb-navy-glow: #354e79;
  --lb-bg: #f5f7f6;     --lb-card: #fff;   --lb-line: #e3e8ee;
  --lb-gray: #e4e9f0;   --lb-gray-d: #c5cdd8;
  --lb-ink: #2f3542;    --lb-muted: #747d8c; --lb-pink: #ff8fa3;
  --lb-font: "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
}

/* ---------- Blocks: every word is a block, and every colour has a job ---------- */
.blk {
  --c: var(--lb-blue);
  --cd: var(--lb-blue-d);
  --t: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 4px;
  padding: .4em .72em .46em;
  border: 0;
  border-radius: .55em;
  background: var(--c);
  color: var(--t);
  font: 900 1em/1.1 var(--lb-font);
  letter-spacing: .005em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgb(0 0 0 / .12);
  box-shadow: inset 0 0 0 0 transparent, 0 4px 0 var(--cd);
  -webkit-tap-highlight-color: transparent;
}
.blk.blue { --c: var(--lb-blue); --cd: var(--lb-blue-d); }
.blk.red { --c: var(--lb-red); --cd: var(--lb-red-d); }
.blk.green { --c: var(--lb-green); --cd: var(--lb-green-d); }
.blk.orange { --c: var(--lb-orange); --cd: var(--lb-orange-d); }
.blk.purple { --c: var(--lb-purple); --cd: var(--lb-purple-d); }
button.blk { cursor: pointer; transition: translate .1s, box-shadow .1s; }
button.blk:active { translate: 0 3px; box-shadow: inset 0 0 0 0 transparent, 0 1px 0 var(--cd); }
button.blk:focus-visible { outline: 3px solid var(--lb-ink); outline-offset: 3px; }

/* The little "+" badge blocks wear while they wait in the tray. */
.blk .plus { position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--lb-blue); transition: scale .2s; }
.blk .plus::before, .blk .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; border-radius: 1px; background: var(--lb-blue); }
.blk .plus::after { rotate: 90deg; }

/* ---------- Chunky buttons ---------- */
.lb-btn {
  --c: var(--lb-gray);
  --cd: var(--lb-gray-d);
  --t: var(--lb-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 3em;
  margin: 0 0 5px;
  padding: .15em 1.35em 0;
  border: 0;
  border-radius: 1em;
  background: var(--c);
  color: var(--t);
  font: 900 1em/1 var(--lb-font);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 5px 0 var(--cd);
  cursor: pointer;
  transition: translate .1s, box-shadow .1s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn svg { flex: none; width: 1.15em; height: 1.15em; }
.lb-btn:hover { background: color-mix(in oklab, var(--c) 90%, #fff); }
.lb-btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--cd); }
.lb-btn:focus-visible { outline: 3px solid var(--lb-blue); outline-offset: 3px; }
.lb-btn.green { --c: var(--lb-green); --cd: var(--lb-green-d); --t: #fff; }
.lb-btn.blue { --c: var(--lb-blue); --cd: var(--lb-blue-d); --t: #fff; }
.lb-btn.red { --c: var(--lb-red); --cd: var(--lb-red-d); --t: #fff; }
.lb-btn.white { --c: #fff; --cd: #d5dbe3; --t: var(--lb-ink); box-shadow: inset 0 0 0 2px #e3e8ef, 0 5px 0 var(--cd); }
.lb-btn.white:active { box-shadow: inset 0 0 0 2px #e3e8ef, 0 1px 0 var(--cd); }
.lb-btn.ghost { --c: transparent; --cd: transparent; --t: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35); }
.lb-btn.ghost:hover { background: rgb(255 255 255 / .08); }
.lb-btn.dark { --c: rgb(255 255 255 / .08); --cd: rgb(0 0 0 / .45); --t: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .16), 0 5px 0 var(--cd); }
.lb-btn.dark:hover { background: rgb(255 255 255 / .14); }
.lb-btn.dark:active { box-shadow: inset 0 0 0 2px rgb(255 255 255 / .16), 0 1px 0 var(--cd); }
.lb-btn.skip { --t: var(--lb-orange); }
.lb-btn.small { min-height: 2.5em; padding: .12em 1em 0; border-radius: .85em; font-size: .9em; box-shadow: 0 4px 0 var(--cd); }
.lb-btn.big { min-height: 3.3em; padding: .15em 1.6em 0; font-size: 1.05em; }
.lb-btn.wide { display: flex; width: 100%; }
.lb-btn:disabled { --c: #dfe4eb; --cd: #c7cfd9; --t: #fff; cursor: not-allowed; }
.lb-btn:disabled:active { translate: none; box-shadow: 0 5px 0 var(--cd); }

/* ---------- The wordmark: "lingoblox" with an orange block for the dot on the i ---------- */
.lb-logo { display: inline-block; font: 900 1.7em/1 var(--lb-font); letter-spacing: -.015em; white-space: nowrap; }
.lb-logo .i { position: relative; }
.lb-logo .i::before { content: ""; position: absolute; left: 50%; top: .02em; width: .21em; height: .21em; translate: -50% 0; border-radius: .05em; background: var(--lb-orange); }

/* ---------- The robot ---------- */
.kubi { display: block; overflow: visible; }
.kubi.blinks .eyes { transform-box: fill-box; transform-origin: center; animation: kubi-blink 5.2s infinite; }
@keyframes kubi-blink { 0%, 45%, 51%, 100% { scale: 1 1; } 48% { scale: 1 .1; } }

@media (prefers-reduced-motion: reduce) {
  .kubi.blinks .eyes { animation: none; }
  button.blk, .lb-btn { transition: none; }
}
