@font-face {
  font-family: "Luckiest Guy";
  src: url("assets/fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("assets/fonts/ComicRelief-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("assets/fonts/ComicRelief-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fffdf7;
  --ink: #000;
  --rule: #5f5a52;
  --muted-ink: #27231e;
  --desktop-shift: max(0px, calc((100vw - 1440px) / 2));
  --display: "Luckiest Guy", "Arial Black", system-ui, sans-serif;
  --body: "Comic Relief", "Trebuchet MS", system-ui, sans-serif;
  --display-letter-spacing: 0.03em;
  --display-line-height: 0.9;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.4;
}

body::after {
  content: "";
  display: block;
  height: 24px;
  background: var(--paper);
}

main {
  overflow: hidden;
  background: var(--paper);
}

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

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

a:focus-visible {
  outline: 3px solid #ffcc27;
  outline-offset: 5px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 14px 38px 16px;
  background: var(--paper);
  border-bottom: 2px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 188px;
  text-decoration: none;
}

.brand img {
  display: none;
}

.brand > span:not(.brand-mark) {
  display: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 184px;
  height: 58px;
  color: var(--ink);
  background: #ffcc27;
  border: 5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
  font-family: var(--display);
  font-size: 41px;
  line-height: var(--display-line-height);
  letter-spacing: var(--display-letter-spacing);
  text-transform: uppercase;
  padding-top: 8px;
  transform: rotate(-5.4deg);
}

.nav-links,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}

.nav-links a,
.site-footer a {
  transition: transform 160ms ease;
}

.nav-links a:hover,
.site-footer a:hover {
  transform: rotate(-2deg) translateY(-1px);
}

.hero {
  position: relative;
  min-height: 960px;
  padding: 0;
}

.hero-copy {
  position: absolute;
  left: calc(var(--desktop-shift) + 151px);
  top: 148px;
  z-index: 2;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  line-height: var(--display-line-height);
  letter-spacing: var(--display-letter-spacing);
  text-transform: uppercase;
}

h1 {
  max-width: 470px;
  font-size: clamp(64px, 5.56vw, 80px);
}

.hero h1 {
  line-height: 0.9;
}

.hero-lede {
  max-width: 410px;
  min-height: 160px;
  margin: 31px 0 21px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.18;
}

.store-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.store-links a {
  display: inline-flex;
}

.store-links img {
  width: 208px;
  height: 60px;
  object-fit: contain;
}

.store-links img[src$="google-play.svg"] {
  transform: rotate(180deg) scaleX(-1);
}

.phone-scene {
  position: absolute;
  left: calc(var(--desktop-shift) + 726px);
  top: 112px;
  z-index: 2;
  width: 688px;
  height: 728px;
}

.phone {
  position: absolute;
}

.phone-home {
  left: 0;
  top: 0;
  z-index: 2;
  width: 351px;
  height: 728px;
}

.phone-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.phone-screen-home {
  position: absolute;
  top: 21px;
  left: 26px;
  z-index: 3;
  width: 308px;
  height: 695px;
  border-radius: 25px;
  object-fit: cover;
  transform: rotate(0.25deg);
}

.phone-cluster {
  left: 215px;
  top: 43px;
  z-index: 1;
  width: 453px;
  height: 675px;
}

.phone-cluster-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.decor {
  position: absolute;
  pointer-events: none;
}

.decor-dots {
  opacity: 1;
  background: none;
  transform: none;
}

.decor-dots-top {
  top: -112px;
  right: 0;
  width: 240px;
  height: 323px;
}

.decor-dots-left {
  top: 584px;
  left: -105px;
  width: 210px;
  height: 323px;
}

.decor-zap {
  top: 168px;
  left: calc(var(--desktop-shift) + 605px);
  width: 84px;
  height: 112px;
}

.decor-star,
.sparkle {
  background: transparent;
  clip-path: none;
}

.decor-star-one {
  top: 341px;
  left: calc(var(--desktop-shift) + 648px);
  width: 22px;
  height: 19px;
}

.decor-star-two {
  top: 647px;
  left: calc(var(--desktop-shift) + 628px);
  width: 40px;
  height: 35px;
}

.decor-squiggle {
  border: 0;
  border-radius: 0;
  transform: none;
}

.decor-squiggle-one {
  top: 368px;
  left: calc(var(--desktop-shift) + 26px);
  width: 90px;
  height: 37px;
}

.decor-squiggle-two {
  top: 747px;
  left: calc(var(--desktop-shift) + 342px);
  width: 82px;
  height: 37px;
}

.games-section {
  position: relative;
  padding: 0 36px 27px;
}

.anchor-target {
  position: absolute;
  top: -120px;
}

.section-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 43px 349px 43px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  height: 69px;
  margin: 0 auto 43px;
  max-width: 1358px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 349px;
  height: 69px;
  font-size: 31px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.heading-line {
  width: 100%;
  height: 2px;
  background: var(--rule);
}

.heading-tick {
  width: 43px;
  height: 43px;
}

.game-grid {
  display: grid;
  grid-template-columns: 318px 319px 318px 318px;
  justify-content: space-between;
  gap: 72px 20px;
  max-width: 1333px;
  margin: 0 auto;
}

.game-card {
  position: relative;
  aspect-ratio: auto;
  min-width: 0;
  padding: 0;
}

.game-card-art {
  width: 100%;
  height: auto;
}

.about-section {
  scroll-margin-top: 126px;
  padding: 41px clamp(24px, 5vw, 82px) 73px;
}

.about-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(14px, 2.2vw, 32px);
  max-width: 1291px;
  min-height: 334px;
  margin: 0 auto;
  padding: 38px clamp(32px, 4vw, 52px) 34px clamp(30px, 3.4vw, 42px);
  border: 0;
  border-radius: 4px;
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/figma/exported/about-outline.png") center / 100% 100% no-repeat;
  pointer-events: none;
}

.about-art {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(100%, 500px);
  min-height: 0;
  aspect-ratio: 500 / 252;
}

.about-cloud {
  position: absolute;
  top: 9.5%;
  left: 21%;
  width: 79%;
  height: auto;
  object-fit: contain;
}

.sparkle {
  position: absolute;
  z-index: 1;
  height: auto;
}

.sparkle-one {
  top: 9.5%;
  left: 9.4%;
  width: 12.4%;
}

.sparkle-two {
  top: 64.3%;
  left: 16.4%;
  width: 11.2%;
}

.about-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 669px);
  max-width: 669px;
  transform: translateY(-11px);
}

.about-copy h2 {
  margin-bottom: 13px;
  font-size: 50px;
}

.about-copy p {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
}

.about-copy p:not(.about-tagline) {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-bottom: 12px;
}

.about-tagline {
  display: inline-block;
  margin-top: 0 !important;
  margin-left: 0 !important;
  font-weight: 700;
  background-image: linear-gradient(#ffcc27, #ffcc27);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 5px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 15px 64px;
  background: var(--paper);
  color: var(--ink);
  border-top: 2px solid var(--rule);
}

.footer-mark {
  display: inline-flex;
  width: 63px;
  height: 60px;
}

.site-footer > span {
  font-family: var(--display);
  font-size: 25px;
  line-height: var(--display-line-height);
  letter-spacing: var(--display-letter-spacing);
  text-transform: uppercase;
}

.legal-page {
  width: min(920px, calc(100% - 44px));
  margin: 0 auto;
  padding: 86px 0 96px;
}

.legal-page h1 {
  max-width: none;
  font-size: clamp(54px, 10vw, 116px);
  white-space: nowrap;
}

.legal-page h2 {
  margin-top: 42px;
  font-size: clamp(34px, 5vw, 60px);
}

.legal-page p,
.legal-page li {
  color: var(--muted-ink);
}

.legal-page ul {
  padding-left: 24px;
}

.legal-updated {
  color: var(--muted-ink);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .site-header {
    min-height: 92px;
    padding: 12px 28px;
  }

  .brand {
    min-width: 142px;
  }

  .brand-mark {
    width: 138px;
    height: 44px;
    border-width: 4px;
    font-size: 31px;
  }

  .nav-links,
  .site-footer nav {
    gap: clamp(18px, 4vw, 42px);
    font-size: 24px;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(310px, 410px) minmax(430px, 560px);
    min-height: 760px;
    gap: 28px;
    padding: 78px clamp(34px, 6vw, 92px) 72px;
  }

  .hero-copy {
    position: relative;
    left: auto;
    top: auto;
    align-self: start;
    padding-top: 100px;
  }

  .phone-scene {
    position: relative;
    left: auto;
    top: auto;
    width: min(100%, 690px);
    height: 590px;
  }

  .phone-home {
    width: 285px;
    height: 590px;
  }

  .phone-screen-home {
    top: 17px;
    left: 21px;
    width: 250px;
    height: 563px;
    border-radius: 21px;
  }

  .phone-cluster {
    left: 175px;
    top: 35px;
    width: 368px;
    height: 548px;
  }

  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 62px 30px;
  }

  .section-heading {
    display: grid;
    grid-template-columns: minmax(40px, 1fr) 34px auto 34px minmax(40px, 1fr);
    align-items: center;
    gap: 8px;
    transform: none;
  }

  .section-heading h2,
  .heading-line,
  .heading-tick {
    position: static;
  }

  .section-heading h2 {
    width: auto;
    height: auto;
  }

  .heading-line {
    width: auto;
  }

  .heading-tick {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 38px;
  }

  .hero-copy {
    padding-top: 0;
  }

  h1 {
    max-width: 650px;
  }

  .phone-scene {
    justify-self: center;
    width: min(100%, 620px);
  }

  .decor-zap {
    left: auto;
    right: 28%;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 319px));
    justify-content: center;
  }

  .about-card {
    grid-template-columns: 1fr;
    overflow: hidden;
    padding: 32px;
  }

  .about-section {
    scroll-margin-top: 0;
  }

  .about-copy {
    transform: none;
  }

  .about-copy p:not(.about-tagline),
  .about-tagline {
    width: auto;
    max-width: none;
    margin-left: 0 !important;
  }

  .about-art {
    width: min(100%, 430px);
    min-height: 210px;
  }

  .about-cloud {
    left: 50%;
    width: min(355px, 86%);
    transform: translateX(-50%);
  }
}

@media (max-width: 620px) {
  body {
    font-size: 18px;
  }

  .site-header,
  .site-footer {
    padding-right: 22px;
    padding-left: 22px;
  }

  .nav-links,
  .site-footer nav {
    gap: 18px 26px;
    font-size: 21px;
  }

  .hero {
    padding-right: 22px;
    padding-left: 22px;
  }

  h1 {
    font-size: clamp(50px, 15vw, 72px);
  }

  .hero-lede {
    font-size: 24px;
  }

  .decor-zap {
    top: 176px;
    right: 18px;
    width: 62px;
    height: auto;
  }

  .store-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .phone-scene {
    height: 500px;
  }

  .phone-home {
    width: 242px;
    height: 502px;
  }

  .phone-screen-home {
    top: 15px;
    left: 18px;
    width: 212px;
    height: 479px;
    border-radius: 18px;
  }

  .phone-cluster {
    right: auto;
    left: 136px;
    top: 50px;
    width: 280px;
    height: 417px;
  }

  .section-heading {
    grid-template-columns: 24px auto 24px;
    justify-content: center;
    gap: 4px;
    margin-bottom: 36px;
  }

  .heading-line {
    display: none;
  }

  .heading-tick {
    width: 24px;
    height: 24px;
  }

  .section-heading h2 {
    font-size: 29px;
  }

  .game-grid {
    grid-template-columns: minmax(0, 319px);
    gap: 34px;
  }

  .about-section {
    padding-right: 22px;
    padding-left: 22px;
  }

  .about-card {
    padding: 24px 20px 28px;
  }

  .about-copy h2 {
    font-size: 42px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  h1 {
    max-width: 330px;
    font-size: clamp(47px, 14vw, 56px);
  }

  .hero-lede {
    max-width: 320px;
    min-height: 0;
    margin-top: 24px;
    font-size: 23px;
  }

  .decor-zap {
    display: none;
  }

  .about-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .about-card {
    padding: 24px 18px 26px;
  }

  .about-art {
    justify-self: start;
    width: 100%;
    min-height: 188px;
    aspect-ratio: auto;
  }

  .about-cloud {
    top: 18px;
    left: 52%;
    width: min(276px, 82%);
  }

  .sparkle-one {
    top: 23px;
    left: 12%;
    width: 48px;
  }

  .sparkle-two {
    top: 122px;
    left: 21%;
    width: 42px;
  }

  .about-copy h2 {
    font-size: 36px;
  }

  .about-copy p {
    font-size: 19px;
    line-height: 1.16;
  }
}
