@font-face {
  font-family: "Fredoka";
  src: url("../assets/game-shell/assets/fonts/fredoka-400.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Fredoka";
  src: url("../assets/game-shell/assets/fonts/fredoka-600.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

:root {
  --navy: #174a7e;
  --navy-deep: #0d3158;
  --cream: #fbf3e5;
  --paper: #fffdf8;
  --sun: #f3c84b;
  --leaf: #3e735c;
  --ink: #182536;
  --muted: #5d6872;
  --line: #d9d2c4;
  color: var(--ink);
  background: var(--cream);
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
}

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

a {
  color: var(--navy);
  text-underline-offset: .18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 12px 16px;
  background: white;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -.035em;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  width: min(1240px, calc(100% - 40px));
  min-height: 620px;
  margin: 0 auto;
  padding: 46px 0 72px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.kicker,
.card-age,
.resource-type {
  margin: 0 0 10px;
  color: var(--leaf);
  font-weight: 600;
  letter-spacing: .01em;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--navy-deep);
  font-size: clamp(3.6rem, 7.2vw, 7.2rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .9;
}

h2 {
  color: var(--navy-deep);
  font-size: clamp(2.15rem, 4vw, 4rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

h3 {
  color: var(--navy-deep);
  font-size: 1.35rem;
  line-height: 1.15;
}

.lede {
  max-width: 56ch;
  margin-bottom: 28px;
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions,
.card-copy,
.resource {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  font: 600 1rem/1.2 "Fredoka", "Trebuchet MS", sans-serif;
  text-decoration: none;
}

.button-primary {
  background: var(--navy);
  color: white;
}

.button-primary:hover {
  background: var(--navy-deep);
}

.button-quiet {
  background: transparent;
}

.age-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.hero-art {
  position: relative;
  margin: 0;
  padding: 28px;
  background: var(--sun);
  border-radius: 48% 48% 20px 20px;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: auto 12% 12px;
  height: 16px;
  background: var(--navy);
  border-radius: 50%;
  opacity: .16;
}

.hero-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  padding: 76px max(20px, calc((100vw - 1240px) / 2));
  background: var(--navy);
  color: white;
}

.intro h2 {
  margin: 0;
  color: white;
  font-size: clamp(2.2rem, 4.3vw, 4.6rem);
}

.intro p {
  max-width: 52ch;
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.65;
}

.activity-section,
.family-section {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 100px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.section-heading h2 {
  max-width: 720px;
  margin-bottom: 0;
}

.section-note {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.activity-card {
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(220px, 1fr);
  min-height: 430px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.card-preview {
  position: relative;
  display: block;
  min-height: 100%;
  background: #ece8de;
  overflow: hidden;
}

.card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card-preview::after {
  content: "Open";
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--navy-deep);
  font-weight: 600;
}

.card-copy {
  align-content: start;
  padding: 28px;
}

.card-copy .card-age {
  flex-basis: 100%;
  margin-bottom: 0;
}

.card-copy h3,
.card-copy p,
.card-copy .button,
.card-copy .small-link {
  flex-basis: 100%;
}

.card-copy h3 {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.card-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.card-copy .button {
  align-self: end;
  margin-top: auto;
}

.small-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.family-section {
  padding-top: 20px;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.resource {
  grid-column: span 4;
  align-content: start;
  padding: 28px;
  background: var(--paper);
  border-top: 6px solid var(--navy);
}

.resource:nth-child(2n) {
  background: #fff8e7;
}

.resource h3,
.resource p,
.resource a,
.resource button,
.resource .status {
  flex-basis: 100%;
}

.resource h3 {
  margin-bottom: 4px;
}

.resource p {
  color: var(--muted);
  line-height: 1.55;
}

.resource a,
.resource button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  font: 600 1rem/1.2 "Fredoka", "Trebuchet MS", sans-serif;
}

.resource button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.resource .small-link {
  margin-top: -8px;
}

.status {
  color: var(--muted);
  font-size: .9rem;
}

.resource-pending {
  border-top-color: var(--sun);
}

.trust {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(20px, calc((100vw - 1240px) / 2));
  background: var(--sun);
}

.trust p {
  max-width: 58ch;
  margin: 0;
  font-weight: 600;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px max(20px, calc((100vw - 1240px) / 2));
  background: var(--navy-deep);
  color: white;
}

footer p {
  margin: 0;
}

footer .brand {
  color: white;
}

footer .text-link {
  color: white;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-art {
    width: min(620px, 100%);
    margin: 10px auto 0;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .activity-card {
    min-height: 360px;
  }

  .resource {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .topbar,
  .hero,
  .activity-section,
  .family-section {
    width: min(100% - 28px, 1240px);
  }

  .topbar {
    min-height: 62px;
  }

  .topbar .text-link {
    max-width: 130px;
    text-align: right;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(3.1rem, 17vw, 5.2rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-art {
    padding: 14px;
    border-radius: 34px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 54px;
  }

  .section-heading {
    display: block;
  }

  .section-heading .text-link,
  .section-note {
    margin-top: 18px;
  }

  .activity-section,
  .family-section {
    padding-block: 66px;
  }

  .activity-card {
    grid-template-columns: 1fr;
  }

  .card-preview {
    max-height: 300px;
  }

  .card-preview img {
    object-position: top;
  }

  .card-copy {
    padding: 22px;
  }

  .resource {
    grid-column: 1 / -1;
  }

  .trust,
  footer {
    display: block;
  }

  .trust p + p,
  footer p,
  footer .text-link {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card-preview img {
    transition: transform 240ms ease;
  }

  .activity-card:hover .card-preview img {
    transform: scale(1.018);
  }
}

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