:root {
  --lek-ink: #173f4d;
  --lek-paper: #f7f3eb;
  --lek-muted: #547078;
  --lek-berry: #93475f;
  --lek-gold: #c99345;
}

.baby-games-page,
.baby-game-single {
  background: var(--lek-paper);
  color: var(--lek-ink);
}

.baby-games-shell,
.baby-game-single > article {
  width: min(82rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.baby-games-eyebrow {
  margin: 0 0 .6rem;
  color: #8a5c2f;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.baby-games-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 8rem);
  background:
    linear-gradient(90deg, rgba(5, 35, 45, .94) 0%, rgba(7, 47, 57, .82) 42%, rgba(10, 44, 52, .37) 100%),
    linear-gradient(0deg, rgba(6, 30, 37, .62), transparent 56%),
    url("scenes/animal-parade.webp") center 44% / cover no-repeat,
    #0a3845;
  color: #fff;
}

.baby-games-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
}

.baby-games-hero::after {
  width: 14rem;
  height: 14rem;
  bottom: -7rem;
  left: 8vw;
}

.baby-games-hero .baby-games-shell {
  position: relative;
  z-index: 1;
}

.baby-games-hero h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.05em;
}

.baby-games-hero .baby-games-eyebrow {
  color: #f0cb8a;
}

.baby-games-hero p:not(.baby-games-eyebrow) {
  max-width: 46rem;
  color: rgba(255, 255, 255, .84);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.baby-games-hero__promise,
.baby-game-single__chips,
.baby-game-card__terms {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.baby-games-hero__promise {
  margin-top: 1.5rem;
}

.baby-games-hero__promise span,
.baby-game-single__chips span,
.baby-game-card__terms span {
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.baby-games-hero__promise span {
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(4, 30, 37, .24);
  color: #fff;
}

.baby-games-library {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.baby-games-library__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.baby-games-library h2,
.baby-games-principles h2,
.baby-game-single h2 {
  margin: 0;
  color: var(--lek-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.baby-games-library__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.baby-games-button,
.baby-game-tools button {
  min-height: 3rem;
  padding: .68rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--lek-ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.baby-games-button--quiet {
  border-color: rgba(23, 63, 77, .2);
  background: #fff;
  color: var(--lek-ink);
}

.baby-games-button:hover,
.baby-games-button:focus-visible,
.baby-game-tools button:hover,
.baby-game-tools button:focus-visible {
  background: var(--lek-berry);
  color: #fff;
}

.baby-games-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(23, 63, 77, .12);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1.2rem 3rem rgba(23, 63, 77, .07);
}

.baby-games-filters label {
  display: grid;
  gap: .4rem;
  color: var(--lek-ink);
  font-weight: 800;
}

.baby-games-filters input[type="search"],
.baby-games-filters select {
  width: 100%;
  min-height: 3.1rem;
  padding: .65rem .8rem;
  border: 1px solid rgba(23, 63, 77, .24);
  border-radius: .85rem;
  background: #fff;
  color: var(--lek-ink);
  font: inherit;
}

.baby-games-filters__search {
  grid-column: span 2;
}

.baby-games-filters .baby-games-filters__favorite {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 3.1rem;
  padding: .6rem .8rem;
  border-radius: .85rem;
  background: #eee8dc;
}

.baby-games-filters__favorite input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--lek-berry);
}

.baby-games-library__summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 1.25rem;
  color: var(--lek-muted);
}

.baby-games-library__summary p {
  margin: 0;
}

.baby-games-library__summary p:first-child {
  color: var(--lek-ink);
  font-weight: 850;
}

.baby-games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.baby-game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 63, 77, .12);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 .9rem 2.4rem rgba(23, 63, 77, .075);
  transition: transform .2s ease, box-shadow .2s ease;
}

.baby-game-card:hover {
  transform: translateY(-.25rem);
  box-shadow: 0 1.3rem 3rem rgba(23, 63, 77, .12);
}

.baby-game-card[hidden] {
  display: none !important;
}

.baby-game-card__visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  text-decoration: none;
}

.baby-game-card__duration {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(8, 45, 57, .9);
  color: #fff;
  font-size: .78rem;
  font-weight: 850;
}

.baby-game-card__body {
  padding: 1.1rem;
}

.baby-game-card__title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .7rem;
}

.baby-game-card h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.baby-game-card h3 a {
  color: var(--lek-ink);
  text-decoration: none;
}

.baby-game-card__body > p {
  margin-block: .65rem .85rem;
  color: var(--lek-muted);
}

.baby-game-card__terms span,
.baby-game-single__chips span {
  background: #f0ece3;
  color: #695348;
}

.baby-game-favorite {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 2.7rem;
  min-height: 2.7rem;
  padding: .4rem;
  border: 1px solid rgba(147, 71, 95, .25);
  border-radius: 999px;
  background: #fff;
  color: var(--lek-berry);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.baby-game-favorite[aria-pressed="true"] {
  background: var(--lek-berry);
  color: #fff;
}

.baby-game-favorite--wide {
  width: max-content;
  margin-top: 1rem;
  padding-inline: .9rem;
}

.baby-games-empty {
  padding: 3rem 1.25rem;
  border: 1px dashed rgba(23, 63, 77, .3);
  border-radius: 1.3rem;
  text-align: center;
}

.baby-games-principles {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(2rem, 6vw, 6rem) clamp(5rem, 9vw, 9rem);
}

.baby-games-principles ol {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.baby-games-principles li {
  position: relative;
  display: grid;
  gap: .25rem;
  min-height: 5rem;
  padding: 1.15rem 1.15rem 1.15rem 4.5rem;
  border-radius: 1.1rem;
  background: #fff;
  counter-increment: principle;
}

.baby-games-principles li::before {
  content: counter(principle, decimal-leading-zero);
  position: absolute;
  left: 1.1rem;
  top: 1rem;
  color: var(--lek-gold);
  font-family: Georgia, serif;
  font-size: 1.7rem;
}

.baby-games-principles li span {
  color: var(--lek-muted);
}

.baby-game-visual {
  --visual-a: #9edfd4;
  --visual-b: #154d5d;
  --visual-c: #f3c978;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 22%, rgba(255, 255, 255, .34), transparent 22%),
    linear-gradient(145deg, var(--visual-a), var(--visual-b));
}

.baby-game-visual--image {
  background: #173f4d;
}

.baby-game-visual--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.001);
  transition: transform .55s cubic-bezier(.2, .65, .25, 1), filter .3s ease;
}

.baby-game-card:hover .baby-game-visual--image img,
.baby-game-card:focus-within .baby-game-visual--image img {
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.035);
}

.baby-game-visual--moss { --visual-a: #b8d39d; --visual-b: #315d4e; --visual-c: #ecd083; }
.baby-game-visual--berry { --visual-a: #e5a7b5; --visual-b: #733b58; --visual-c: #f5d589; }
.baby-game-visual--sun { --visual-a: #f4cf81; --visual-b: #a65e42; --visual-c: #f7edbc; }
.baby-game-visual--dusk { --visual-a: #8597d4; --visual-b: #26345e; --visual-c: #f0c87a; }
.baby-game-visual--sea { --visual-a: #8fd2d3; --visual-b: #285b70; --visual-c: #d9f0dc; }

.baby-game-visual__orb {
  position: absolute;
  border: .3rem solid rgba(255, 255, 255, .76);
  border-radius: 50%;
  box-shadow: 0 .8rem 2rem rgba(13, 49, 57, .14);
}

.baby-game-visual__orb--one {
  width: 7.6rem;
  height: 7.6rem;
  left: 18%;
  top: 22%;
  background: color-mix(in srgb, var(--visual-c) 75%, transparent);
}

.baby-game-visual__orb--two {
  width: 4.2rem;
  height: 4.2rem;
  right: 20%;
  bottom: 21%;
  background: rgba(255, 255, 255, .25);
}

.baby-game-visual__line {
  position: absolute;
  width: 48%;
  height: 28%;
  left: 29%;
  top: 40%;
  border-top: .32rem solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  transform: rotate(-10deg);
}

.baby-game-visual__spark {
  position: absolute;
  right: 16%;
  top: 15%;
  color: var(--visual-c);
  font-size: 2.1rem;
  text-shadow: 0 .2rem .8rem rgba(0, 0, 0, .2);
}

.baby-game-visual--path .baby-game-visual__line,
.baby-game-visual--storywalk .baby-game-visual__line {
  width: 68%;
  height: 45%;
  left: 14%;
  top: 34%;
  border-width: .65rem;
  transform: rotate(6deg);
}

.baby-game-visual--music .baby-game-visual__orb--one,
.baby-game-visual--sound .baby-game-visual__orb--one,
.baby-game-visual--rain .baby-game-visual__orb--one {
  background: transparent;
  border-width: .6rem;
}

.baby-game-visual--city .baby-game-visual__orb,
.baby-game-visual--sort .baby-game-visual__orb,
.baby-game-visual--basket .baby-game-visual__orb {
  border-radius: 1rem;
}

.baby-game-visual--sleep .baby-game-visual__orb--one,
.baby-game-visual--star .baby-game-visual__orb--one {
  border-radius: 50% 50% 50% 12%;
  transform: rotate(-25deg);
}

.baby-game-visual--wave .baby-game-visual__line,
.baby-game-visual--breath .baby-game-visual__line,
.baby-game-visual--scarf .baby-game-visual__line,
.baby-game-visual--float .baby-game-visual__line {
  width: 72%;
  left: 14%;
  border-top-width: .6rem;
  transform: rotate(0deg);
}

.baby-game-single {
  padding-bottom: clamp(4rem, 9vw, 8rem);
}

.baby-game-single__hero {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  overflow: hidden;
  border-radius: 0 0 clamp(1.8rem, 4vw, 3.2rem) clamp(1.8rem, 4vw, 3.2rem);
  background: #0b3947;
  color: #fff;
}

.baby-game-single__copy {
  align-self: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.baby-game-single__back {
  display: inline-block;
  margin-bottom: 2rem;
  color: #bde4df;
  font-weight: 800;
  text-decoration: none;
}

.baby-game-single__hero .baby-games-eyebrow {
  color: #f0cb8a;
}

.baby-game-single h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.05em;
}

.baby-game-single__excerpt {
  margin-block: 1rem 1.2rem;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.baby-game-single__chips span {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.baby-game-single__visual {
  min-height: 35rem;
}

.baby-game-single__read-first {
  display: flex;
  justify-content: center;
  gap: .8rem 1.2rem;
  margin: clamp(1.5rem, 3vw, 2.5rem) auto;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: #e9e2d5;
  color: var(--lek-ink);
}

.baby-game-single__read-first span {
  color: var(--lek-muted);
}

.baby-game-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, .7fr);
  gap: clamp(2rem, 6vw, 5rem);
  width: min(68rem, 100%);
  margin: clamp(3rem, 7vw, 6rem) auto;
}

.baby-game-single__content {
  font-size: 1.08rem;
  line-height: 1.75;
}

.baby-game-single__content h2 {
  margin-top: 2.3rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.baby-game-single__content ol,
.baby-game-single__content ul {
  padding-left: 1.35rem;
}

.baby-game-single__content li + li {
  margin-top: .65rem;
}

.baby-game-intro {
  padding: 1.2rem 1.3rem;
  border-left: .35rem solid var(--lek-gold);
  border-radius: 0 .8rem .8rem 0;
  background: rgba(255, 255, 255, .72);
}

.baby-game-single__side {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.baby-game-safety,
.baby-game-tools {
  padding: 1.35rem;
  border: 1px solid rgba(23, 63, 77, .12);
  border-radius: 1.25rem;
  background: #fff;
}

.baby-game-safety h2,
.baby-game-tools h2 {
  font-size: 1.65rem;
}

.baby-game-safety p:not(.baby-games-eyebrow) {
  color: var(--lek-muted);
}

.baby-game-tools {
  display: grid;
  gap: .65rem;
}

.baby-game-tools button {
  width: 100%;
}

.baby-game-single__next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: min(68rem, 100%);
  margin-inline: auto;
}

.baby-game-single__next a {
  min-height: 5rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid rgba(23, 63, 77, .14);
  border-radius: 1.1rem;
  background: #fff;
  color: var(--lek-ink);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 960px) {
  .baby-games-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .baby-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .baby-games-library__heading,
  .baby-games-principles,
  .baby-game-single__hero,
  .baby-game-single__layout {
    grid-template-columns: 1fr;
  }

  .baby-games-library__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .baby-game-single__visual {
    min-height: 19rem;
  }

  .baby-game-single__read-first {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .baby-games-shell,
  .baby-game-single > article {
    width: min(100% - 1.25rem, 82rem);
  }

  .baby-games-filters,
  .baby-games-grid,
  .baby-game-single__next {
    grid-template-columns: 1fr;
  }

  .baby-games-filters__search {
    grid-column: auto;
  }

  .baby-games-library__actions,
  .baby-games-library__summary {
    align-items: stretch;
    flex-direction: column;
  }

  .baby-games-button {
    width: 100%;
  }

  .baby-game-single__copy {
    padding-inline: 1.1rem;
  }
}

@media print {
  header,
  footer,
  .baby-game-single__visual,
  .baby-game-single__back,
  .baby-game-favorite,
  .baby-game-tools,
  .baby-game-single__next {
    display: none !important;
  }

  .baby-game-single,
  .baby-game-single__hero,
  .baby-game-single__copy {
    background: #fff !important;
    color: #000 !important;
  }

  .baby-game-single h1,
  .baby-game-single__hero p,
  .baby-game-single__chips span {
    color: #000 !important;
  }

  .baby-game-single__layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .baby-game-card,
  .baby-game-visual--image img {
    transition: none;
  }
}
