/* Monster Puzzles website. Colours, type and shapes follow docs/brand/style-guide.md. */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('fonts/nunito-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('fonts/nunito-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('fonts/nunito-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: dark;

  --color-ground: #2b1b4f;
  --color-surface: #3d2a6b;
  --color-surface-raised: #4a3480;
  --color-surface-sunk: #22153f;
  --color-bezel: #140b2b;
  --color-line: #6a54a8;
  --color-ink: #ffffff;
  --color-ink-soft: #c9bdf0;
  --color-ink-dark: #2b1b4f;
  --color-slime: #b8f24a;
  --color-slime-shade: #6fa81e;
  --color-ember: #ff8a3d;
  --color-ember-shade: #c2601f;
  --color-bubblegum: #ff5fa2;
  --color-bubblegum-shade: #b83a72;
  --color-splash: #4fd6e8;
  --color-splash-shade: #2a9aab;
  --color-gold: #ffd23f;
  --color-gold-shade: #c99a00;

  --font-round: 'Nunito', 'SF Pro Rounded', ui-rounded, system-ui, sans-serif;

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --lift-tray: 0 6px 0 var(--color-surface-sunk);
  --lift-slime: 0 6px 0 var(--color-slime-shade);

  --page-width: 1120px;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  background-color: var(--color-ground);
  /* A scatter of small stars, like the night sky behind the game. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%236a54a8'%3E%3Ccircle cx='18' cy='30' r='1.6'/%3E%3Ccircle cx='132' cy='14' r='1.2'/%3E%3Ccircle cx='206' cy='72' r='1.8'/%3E%3Ccircle cx='84' cy='108' r='1.1'/%3E%3Ccircle cx='160' cy='150' r='1.5'/%3E%3Ccircle cx='38' cy='190' r='1.3'/%3E%3Ccircle cx='224' cy='214' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--color-ink);
  font-family: var(--font-round);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: var(--color-slime);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--color-splash);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 900;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-slime);
  color: var(--color-ink-dark);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  padding-block: 18px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 40px;
}

.brand span {
  color: var(--color-slime);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--color-ink-soft);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-ink);
}

.site-nav a[aria-current='page'] {
  color: var(--color-ink);
}

.site-nav .lang {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 3px 0 var(--color-surface-sunk);
}

@media (max-width: 599px) {
  .site-nav .nav-optional {
    display: none;
  }

  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand img {
    width: 32px;
  }

  .site-nav a {
    padding-inline: 10px;
  }

  :lang(bg) .brand {
    font-size: 13px;
    letter-spacing: 0;
  }
}

/* Shared pieces */

.eyebrow {
  color: var(--color-ink-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-wrap: balance;
}

.section {
  padding-block: 72px;
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 680px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(32px, 5vw, 46px);
}

.section-head p {
  color: var(--color-ink-soft);
  font-size: 18px;
}

.phone {
  width: 100%;
  border: 9px solid var(--color-bezel);
  border-radius: 46px;
  background: var(--color-bezel);
  box-shadow: 0 10px 0 var(--color-surface-sunk);
  overflow: hidden;
}

.phone img {
  width: 100%;
  border-radius: 37px;
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface-sunk);
  box-shadow: 0 6px 0 #150c2c;
  color: var(--color-ink);
  line-height: 1.15;
}

.coming-soon svg {
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--color-slime);
}

.coming-soon small {
  display: block;
  color: var(--color-slime);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.coming-soon strong {
  display: block;
  font-size: 21px;
  font-weight: 900;
}

/* Hero */

.hero {
  padding-block: 24px 64px;
}

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.wordmark {
  display: grid;
  font-size: clamp(54px, 11vw, 104px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 0.92;
  text-transform: uppercase;
}

.wordmark span:first-child {
  color: var(--color-slime);
}

.wordmark span:last-child {
  transform: rotate(-3deg);
  transform-origin: left center;
}

/* Bulgarian words are longer: keep the wordmark on screen. */
:lang(bg) .wordmark {
  font-size: clamp(42px, 8.6vw, 84px);
}

.hero-lead {
  max-width: 34em;
  color: var(--color-ink-soft);
  font-size: 19px;
}

.hero-lead strong {
  color: var(--color-ink);
}

.hero-note {
  color: var(--color-ink-soft);
  font-size: 15px;
}

.hero-art {
  justify-self: center;
  width: min(300px, 80vw);
  margin-top: 8px;
}

.hero-art .phone {
  transform: rotate(3deg);
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-art {
    width: 320px;
  }
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promises li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 800;
}

.promises svg {
  width: 20px;
  height: 20px;
  color: var(--color-slime);
}

/* Accent colour for a badge or card icon; slime when none is set. */
[data-tone='bubblegum'] {
  --tone: var(--color-bubblegum);
}

[data-tone='gold'] {
  --tone: var(--color-gold);
}

[data-tone='splash'] {
  --tone: var(--color-splash);
}

[data-tone='ember'] {
  --tone: var(--color-ember);
}

/* Line icons: 24px, 2.2px stroke, round caps and joins. */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Games */

.games {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 280px);
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 24px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}

.game {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--lift-tray);
  overflow: hidden;
  scroll-snap-align: start;
}

.game-shot {
  padding: 20px 28px 0;
  background: var(--game-colour);
}

.game-shot .phone {
  border-width: 6px;
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
  box-shadow: none;
  aspect-ratio: 780 / 1320;
}

.game-shot .phone img {
  border-radius: 26px 26px 0 0;
}

.game-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 20px 22px;
}

.game-body h3 {
  font-size: 22px;
}

.game-body p {
  color: var(--color-ink-soft);
  font-size: 16px;
}

.game-skill {
  justify-self: start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--game-colour);
  color: var(--color-ink-dark);
  font-size: 13px;
  font-weight: 800;
}

.game--path {
  --game-colour: var(--color-slime);
}

.game--munch {
  --game-colour: var(--color-bubblegum);
}

.game--dots {
  --game-colour: var(--color-splash);
}

.game--patterns {
  --game-colour: var(--color-gold);
}

.game--domino {
  --game-colour: var(--color-ember);
}

@media (min-width: 1000px) {
  .games {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 4px 0 8px;
    overflow: visible;
  }

  .game-shot {
    padding: 18px 18px 0;
  }
}

/* Worlds */

.split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.split-art {
  justify-self: center;
  width: min(290px, 78vw);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .split--flip {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .split--flip .split-art {
    order: 2;
  }
}

.split .section-head {
  margin-bottom: 24px;
}

.features {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.features li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
}

.features .badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--tone, var(--color-slime));
  box-shadow: 0 4px 0 var(--color-surface-sunk);
  color: var(--color-ink-dark);
}

.features .badge svg {
  width: 24px;
  height: 24px;
}

.features strong {
  display: block;
  font-weight: 900;
}

.features span {
  color: var(--color-ink-soft);
  font-size: 16px;
}

.worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.worlds li {
  padding: 5px 12px;
  border: 2px dashed var(--color-line);
  border-radius: var(--radius-pill);
  color: var(--color-ink-soft);
  font-size: 14px;
  font-weight: 800;
}

.worlds .worlds-next {
  border-style: solid;
  border-color: var(--color-slime);
  color: var(--color-slime);
}

/* Fits every child */

.cards {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--lift-tray);
}

.card h3 {
  font-size: 21px;
}

.card p {
  color: var(--color-ink-soft);
  font-size: 16px;
}

.card .card-icon {
  width: 32px;
  height: 32px;
  color: var(--tone, var(--color-slime));
}

.levels-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.levels-row span {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-raised);
  font-size: 14px;
  font-weight: 800;
}

.levels-row span:nth-child(2) {
  background: var(--color-slime);
  color: var(--color-ink-dark);
}

/* Closing call */

.closing {
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: 44px 24px 48px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--lift-tray);
  text-align: center;
}

.closing img {
  width: 120px;
}

.closing h2 {
  font-size: clamp(30px, 5vw, 44px);
}

.closing p {
  max-width: 32em;
  color: var(--color-ink-soft);
}

/* Footer */

.site-footer {
  padding-block: 48px 40px;
  color: var(--color-ink-soft);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer a {
  color: var(--color-ink-soft);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-ink);
}

/* Policy and support pages */

.doc {
  max-width: 760px;
  padding-block: 24px 40px;
}

.doc-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.doc-head h1 {
  font-size: clamp(36px, 7vw, 52px);
}

.doc-head p {
  color: var(--color-ink-soft);
}

.doc-body {
  padding: 8px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--lift-tray);
}

@media (max-width: 519px) {
  .doc-body {
    padding: 4px 20px 22px;
  }
}

.doc-body h2 {
  margin: 30px 0 10px;
  font-size: 23px;
}

.doc-body h3 {
  margin: 22px 0 6px;
  font-size: 18px;
}

.doc-body p,
.doc-body ul {
  margin: 0 0 12px;
  color: var(--color-ink-soft);
}

.doc-body ul {
  padding-left: 22px;
}

.doc-body li + li {
  margin-top: 6px;
}

.doc-body strong {
  color: var(--color-ink);
}

.contact-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin: 24px 0 8px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--color-surface-sunk);
}

.contact-card a {
  font-size: 22px;
  font-weight: 900;
  word-break: break-all;
}

.faq details {
  border-top: 2px solid var(--color-surface-raised);
}

.faq summary {
  padding: 16px 0;
  color: var(--color-ink);
  font-weight: 800;
  cursor: pointer;
}

.faq details p {
  margin-top: -4px;
  padding-bottom: 14px;
}

.not-found {
  display: grid;
  gap: 20px;
  justify-items: center;
  padding-block: 64px 96px;
  text-align: center;
}

.not-found img {
  width: 140px;
}

.not-found h1 {
  font-size: clamp(36px, 7vw, 52px);
}

.not-found p {
  color: var(--color-ink-soft);
}

.button {
  display: inline-block;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  background: var(--color-slime);
  box-shadow: var(--lift-slime);
  color: var(--color-ink-dark);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-decoration: none;
  text-transform: uppercase;
}

.button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--color-slime-shade);
}
