/* Bit of Luck Games: studio site, in the "crooked stack" logo's colours:
   purple and lime faces, darker extruded sides, black outlines. */

@font-face {
  font-family: 'Bungee';
  src: url('/fonts/bungee.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #fbf6ff;
  --text: #391947;
  --purple: #c973f9;
  --lilac: #ead4fb;
  --plum: #6e2d85;
  --lime: #bcf803;
  --olive: #5e8401;
  --line: #000;
  --display: 'Bungee', 'Arial Black', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --page: min(1080px, 100% - 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--plum);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}
a:hover {
  color: var(--line);
}

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

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--line);
  margin: 0;
  /* The logo's extruded side, as a hard purple shadow. */
  text-shadow: 3px 3px 0 var(--purple);
}
h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.9rem);
  line-height: 1.06;
}
h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.4rem);
  line-height: 1.1;
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  color: var(--line);
}
p {
  margin: 0;
  max-width: 62ch;
}

.wrap {
  width: var(--page);
  margin-inline: auto;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--line);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1;
}
.brand .px {
  width: auto;
  height: 2.1rem;
}
.brand:hover {
  color: var(--line);
}

/* Buttons: chunky blocks that press down. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.35rem;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--lime);
  color: var(--line);
  box-shadow: 0 4px 0 var(--line);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.button:hover {
  color: var(--line);
  background: #c9ff2e;
}
.button:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--line);
}
.button.small {
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.9375rem;
}
.button.quiet {
  background: #fff;
}
.button.quiet:hover {
  background: var(--lilac);
}
/* Dashed outline: something that isn't here yet ("coming soon", the empty games slot). */
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  border: 3px dashed var(--plum);
  border-radius: 14px;
  color: var(--plum);
  font-weight: 700;
  line-height: 1.2;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem);
}
.logo {
  width: min(100%, 33rem);
  height: auto;
  justify-self: center;
}
.hero-text {
  display: grid;
  gap: 1.4rem;
}
.lede {
  font-size: 1.1875rem;
}
.today {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--plum);
  max-width: 34rem;
  transform: rotate(-1deg);
}
.today .px {
  flex: none;
  width: auto;
  height: 1.6rem;
}

/* Sections */

.section {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 3px solid var(--lilac);
}
.section h2 {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

/* Fridge Words */

.game {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}
.shot {
  margin: 0 0 0 0.5rem;
  border: 3px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: #f4eee2;
  box-shadow: 8px 8px 0 var(--plum);
  max-width: 21rem;
  transform: rotate(-2deg);
}
.shot img {
  width: 100%;
  height: auto;
}
.game-text {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}
.game-logo {
  width: min(100%, 17rem);
  height: auto;
}
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.facts li {
  padding-left: 1.5rem;
  position: relative;
}
/* Pixel bullets, like the clover's blocks. */
.facts li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.48em;
  width: 0.62rem;
  height: 0.62rem;
  background: var(--lime);
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--olive);
}
.next-game {
  margin-top: clamp(2.25rem, 5vw, 3rem);
  padding: 1.3rem 1.5rem;
  border: 3px dashed var(--plum);
  border-radius: 20px;
}
.next-game strong {
  color: var(--line);
}

/* What to expect */

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 2.75rem) clamp(2rem, 5vw, 4rem);
}

/* Contact */

.contact-text {
  margin-top: -0.5rem;
}
.mail {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--line);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.6vw, 2.3rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 0.22em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
}
.mail:hover {
  color: var(--plum);
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 2rem 2.5rem;
  border-top: 3px solid var(--lilac);
  font-size: 0.9375rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* Text pages (privacy, 404) */

.page {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
  display: grid;
  gap: 1.1rem;
}
.page h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 0.5rem;
}
.page h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.25rem;
  text-shadow: none;
  margin-top: 1rem;
}
.page .updated {
  color: var(--plum);
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .logo {
    width: min(100%, 22rem);
  }
  .game {
    grid-template-columns: 1fr;
  }
  .shot {
    max-width: 19rem;
  }
  .promises {
    grid-template-columns: 1fr;
  }
  .top .button {
    display: none;
  }
}
