@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(../fonts/baloo-2-latin.woff2) format("woff2");
  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-weight: 400 800;
  font-display: swap;
  src: url(../fonts/nunito-latin.woff2) format("woff2");
  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;
}

/* Shared tokens, typography, navigation and buttons. */

:root {
  color-scheme: dark;
  --night: #101018;
  /* The home page's section grounds, from the hero's night down to the studio's paper. */
  --dusk: #19141f;
  --dusk-deep: #18131e;
  --paper: #eeeae3;
  --muted: #a5a1ac;
  --lavender: #b6abbf;
  --gold: #c8b28c;
  --accent: #d2b8ed;
  --copy: #c4bdcf;
  --copy-soft: #bbb2c8;
  --border: #c8b28c25;
  --border-strong: #c8b28c35;
  --light-surface: #ede9df;
  --light-ink: #292632;
  /* Text on the light surface: both keep at least 4.5:1 against it. */
  --light-accent: #6f5a89;
  --light-muted: #6b6176;
  --light-copy: #645b6c;
  /* The smallest text: captions, eyebrows and fine print. */
  --label-size: 12px;
  --prose-size: 16px;
  --content-width: 1440px;
  --page-gutter: clamp(24px, 7vw, 140px);
  --gutter: max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Trebuchet MS", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 600 17px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

::selection {
  background: var(--gold);
  color: var(--night);
}

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

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

.skip-link {
  position: fixed;
  z-index: 100;
  left: 15px;
  top: 15px;
  padding: 10px 15px;
  background: var(--paper);
  color: var(--night);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

/* A skip link's target: focus moves there, no ring around the whole page. */
main:focus {
  outline: none;
}

/* Square pieces of the game's art, drawn as backgrounds: the Shaman framed out of the loading
   artwork, and the puzzle chips. */
.shaman,
.chip {
  width: 100%;
  aspect-ratio: 1;
  background-repeat: no-repeat;
}

.shaman {
  background-image: url("../images/optimized/mundus/loading-art.88b518a41664.jpg");
  /* Frame the meditating figure from the original 1382x768 loading artwork. */
  background-size: 246.785714% auto;
  background-position: 51.094891% 81.730769%;
  mask-image: radial-gradient(ellipse at 48% 52%, black 48%, transparent 73%);
}

.chip {
  background-size: contain;
  background-position: center;
}

.chip-water {
  background-image: url("../images/mundus/chips/water.png");
}

.chip-sun {
  background-image: url("../images/mundus/chips/yellow.png");
}

.chip-cosmos {
  background-image: url("../images/mundus/chips/violet.png");
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px var(--gutter);
  transition:
    background 0.4s,
    padding 0.4s,
    color 0.4s;
  max-width: 100%;
}

.site-header.scrolled {
  padding-top: 18px;
  padding-bottom: 18px;
  background: #101018dc;
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -1.7px;
  line-height: 1;
}

.brand-dot {
  display: inline-block;
  margin: 3px 0 0 7px;
  color: var(--gold);
  font-size: 17px;
  vertical-align: top;
}

.brand small {
  display: block;
  margin-top: 9px;
  font-size: var(--label-size);
  letter-spacing: 2.8px;
  font-weight: 500;
  color: #b5afba;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 35px;
  font-size: 15px;
  font-weight: 750;
}

.site-header nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.2s;
}

.site-header nav > a:hover,
.site-header nav > a[aria-current="page"] {
  color: var(--gold);
}

.site-header .nav-play {
  gap: 23px;
  background: transparent;
  color: var(--paper);
  padding: 11px 22px;
  border: 1px solid #b6a68e50;
  border-radius: 50px;
}

.site-header .nav-play:hover {
  color: var(--night);
  background: var(--gold);
}

/* Over the light studio section, set by scroll.js. */
.site-header.light {
  background: #ede9dfdf;
  color: var(--light-ink);
}

.site-header.light .brand small {
  color: var(--light-muted);
}

.site-header.light .brand-dot {
  color: var(--light-accent);
}

.site-header.light nav > a:hover {
  color: var(--light-accent);
}

.site-header.light .nav-play {
  background: #292332;
  color: var(--paper);
}

.site-header.light .nav-play:hover {
  background: var(--gold);
  color: var(--night);
}

.eyebrow {
  font-size: var(--label-size);
  letter-spacing: 2px;
  font-weight: 600;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--gold);
}

.section-number {
  display: inline-block;
  margin-right: 20px;
  color: #776d80;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

h2 {
  font-size: clamp(40px, 4.5vw, 76px);
  letter-spacing: -0.015em;
  line-height: 1.16;
}

h1 em,
h2 em {
  font-size: 1em;
  font-weight: 700;
  font-style: normal;
  letter-spacing: inherit;
  color: var(--accent);
  line-height: inherit;
}

.body-copy {
  color: var(--muted);
  font-size: var(--prose-size);
  line-height: 1.8;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 30px;
  padding: 15px 25px;
  border-radius: 60px;
  font-size: 16px;
  font-weight: 800;
  transition:
    transform 0.35s,
    background 0.35s;
}

.button:hover {
  transform: translateY(-3px);
}

.button-gold {
  background: #ded2bc;
  color: #252329;
}

.button-gold:hover {
  background: #eee4d3;
}

.button .scroll-arrow {
  font-size: 19px;
  line-height: 1;
}

.link-arrow {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: -0.15em;
  background: currentColor;
  -webkit-mask: url("../icons/arrow-up-right.svg") center / contain no-repeat;
  mask: url("../icons/arrow-up-right.svg") center / contain no-repeat;
  transition: transform 0.2s ease-out;
}

:is(a, button):is(:hover, :focus-visible) .link-arrow {
  transform: translate(2px, -2px);
}

.scroll-section {
  position: relative;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 16px;
  color: #c5b6d6;
}

.text-link:hover {
  color: var(--paper);
}

footer {
  background: var(--light-surface);
  color: var(--light-ink);
  padding: 35px var(--gutter) 25px;
  border-top: 1px solid #2a233320;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}

footer .brand {
  font-size: 28px;
}

footer .brand-dot {
  color: var(--light-accent);
  font-size: 22px;
}

footer > span {
  font-size: var(--label-size);
  color: var(--light-muted);
}

footer > div {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 25px;
  font-size: var(--label-size);
  color: var(--light-muted);
}

footer > div a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

footer small {
  width: 100%;
  font-size: var(--label-size);
  color: var(--light-muted);
}

.has-reveals .reveal {
  opacity: 0;
  translate: 0 30px;
  transition:
    opacity 0.8s,
    translate 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.has-reveals .reveal.visible {
  opacity: 1;
  translate: 0 0;
}

[data-motion] {
  will-change: transform, opacity;
}

@media (max-width: 650px) {
  :root {
    --page-gutter: 24px;
    --prose-size: 17px;
  }

  html {
    scroll-padding-top: 90px;
  }

  .site-header {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .brand {
    font-size: 27px;
  }

  .brand-dot {
    font-size: 15px;
    margin-left: 5px;
  }

  .brand small {
    margin-top: 6px;
    letter-spacing: 2.1px;
  }

  .site-header nav {
    gap: 15px;
  }

  .site-header .nav-play {
    display: none;
  }

  .site-header .nav-worlds {
    display: none;
  }

  .eyebrow {
    letter-spacing: 1.3px;
  }

  h2 {
    font-size: 42px;
  }

  .button {
    padding: 15px 22px;
  }

  footer {
    padding-top: 30px;
    gap: 20px;
  }

  footer > span {
    font-size: 14px;
    max-width: 160px;
  }

  footer > div {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
  }
}

@media (max-width: 370px) {
  .site-header nav {
    gap: 8px;
    font-size: 14px;
  }

  footer > div {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-motion],
  [data-parallax] {
    transform: none !important;
    opacity: 1 !important;
  }

  :is(a, button):is(:hover, :focus-visible) .link-arrow {
    transform: none;
  }

  .has-reveals .reveal {
    opacity: 1;
    translate: none;
  }
}

@media print {
  .site-header {
    display: none;
  }

  [data-motion],
  .has-reveals .reveal {
    transform: none !important;
    opacity: 1 !important;
    translate: none;
  }

  section {
    break-inside: avoid;
  }
}
