:root {
  --magic-ink: #10275c;
  --magic-night: #080f35;
  --magic-cream: #fff8e9;
  --magic-lilac: #eee9ff;
  --magic-gold: #ffc65d;
}

.magic-hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #fff;
  background: var(--magic-night);
  border-bottom: 1px solid #d5ad66;
}

.magic-hero-image,
.magic-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.magic-hero-image {
  object-fit: cover;
  object-position: center;
}

.magic-hero-shade {
  background: linear-gradient(90deg, rgba(4, 8, 35, .9) 0%, rgba(4, 8, 35, .62) 28%, rgba(4, 8, 35, .08) 58%, rgba(4, 8, 35, .08) 100%);
}

.magic-hero-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(34px, calc((100vw - 1460px) / 2));
  width: 620px;
  max-width: 42vw;
  transform: translateY(-42%);
}

.magic-hero h1,
.original-cast h2,
.mask-gallery h2,
.how-it-works h2 {
  margin: 0;
  font-family: "Kalam", cursive;
  font-weight: 700;
  letter-spacing: 0;
}

.magic-hero h1 {
  max-width: 620px;
  color: #fff9e8;
  font-size: 78px;
  line-height: .92;
  text-shadow: 0 5px 24px rgba(0, 0, 0, .38);
}

.magic-hero-copy > p {
  margin: 22px 0 0;
  font-size: 21px;
  font-weight: 700;
}

.magic-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.magic-hero .world-button {
  min-height: 54px;
  padding: 0 27px;
}

.world-button-outline {
  color: #fff;
  background: rgba(7, 13, 47, .36);
  border: 2px solid rgba(255, 255, 255, .82);
}

.sock-doorway {
  min-height: 480px;
}

.original-cast {
  padding: 32px max(24px, calc((100vw - 1560px) / 2)) 38px;
  color: var(--magic-ink);
  background: #e9e5fa;
  border-bottom: 1px solid #d5ad66;
}

.original-cast > header {
  text-align: center;
  margin-bottom: 20px;
}

.original-cast h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
}

.original-cast > header p {
  margin: 4px 0 0;
  font: 17px Georgia, serif;
  color: #4a4d65;
}

.original-cast-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100% - 40px, 360px);
  margin: 0 auto 20px;
  padding: 3px;
  border: 1px solid #9c94bc;
  border-radius: 6px;
  background: #f8f6ff;
}

.original-cast-modes button {
  min-height: 36px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #302853;
  font: 800 14px "Nunito Sans", sans-serif;
  cursor: pointer;
}

.original-cast-modes button[aria-pressed="true"] {
  background: #302853;
  color: #fff;
}

.original-cast-modes button:focus-visible {
  outline: 2px solid #bd5b46;
  outline-offset: 2px;
}

.original-cast-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 1560px;
  margin: auto;
}

.original-cast-grid figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.original-cast-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}

.original-cast-grid img.is-mask,
.original-cast-grid img.is-pjs {
  object-fit: contain;
}

.original-cast-grid img.is-mask {
  background: #e9ded4;
}

.original-cast-grid img.is-pjs {
  background: #fff;
}

.original-cast-grid figcaption {
  margin-top: 7px;
  font-family: "Kalam", cursive;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.mask-gallery {
  padding: 30px max(24px, calc((100vw - 1560px) / 2)) 36px;
  color: var(--magic-ink);
  background: var(--magic-cream);
  border-bottom: 1px solid #d5ad66;
}

.mask-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1560px;
  margin: 0 auto 20px;
}

.mask-gallery-heading > div {
  flex: 1;
  text-align: center;
}

.mask-gallery h2 {
  font-size: 46px;
  line-height: 1;
}

.mask-gallery-heading p {
  margin: 3px 0 0;
  color: #4a4d65;
  font-family: Georgia, serif;
  font-size: 17px;
}

.mask-gallery-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(760px, 100%);
  margin: 0 auto 20px;
  padding: 4px;
  background: #ece6dc;
  border-radius: 6px;
}

.mask-gallery-tabs button {
  min-height: 43px;
  padding: 6px 10px;
  color: var(--magic-ink);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: 900 13px "Nunito Sans", sans-serif;
  cursor: pointer;
}

.mask-gallery-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--magic-ink);
}

.mask-gallery-tabs button:focus-visible {
  outline: 2px solid var(--magic-ink);
  outline-offset: 2px;
}

.mask-gallery-panel[hidden] {
  display: none;
}

.mask-gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 1560px;
  margin: 0 auto;
}

.mask-card {
  display: grid;
  grid-template-rows: 180px auto auto auto;
  min-width: 0;
  padding: 12px 12px 14px;
  color: var(--magic-ink);
  background: #f4ecdf;
  border: 1px solid rgba(16, 39, 92, .08);
  border-radius: 8px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mask-card:hover,
.mask-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(48, 36, 73, .13);
}

.mask-card img {
  align-self: center;
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 5px;
  filter: drop-shadow(0 10px 9px rgba(51, 35, 61, .15));
}

.mask-card img.is-worn {
  object-fit: cover;
  object-position: center 39%;
}

.mask-card strong {
  margin-top: 5px;
  font-family: "Kalam", cursive;
  font-size: 24px;
  line-height: 1;
}

.mask-card span {
  margin-top: 3px;
  color: #55566b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mask-card button {
  justify-self: start;
  margin-top: 10px;
  padding: 0 0 2px;
  color: var(--magic-ink);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  font: 800 12px "Nunito Sans", sans-serif;
  cursor: pointer;
}

.mask-card button:focus-visible {
  outline: 2px solid var(--magic-ink);
  outline-offset: 4px;
}

.mask-card-grown {
  background: #f5e7eb;
}

.mask-card-teaser {
  grid-template-rows: 180px;
  margin: 0;
  background: #e7e3ee;
}

.mask-card-teaser-image {
  position: relative;
  overflow: hidden;
  height: 180px;
  border-radius: 5px;
  background: #397093;
}

.mask-card-teaser:nth-child(2) .mask-card-teaser-image { background: #9a5472; }
.mask-card-teaser:nth-child(3) .mask-card-teaser-image { background: #4c866f; }
.mask-card-teaser:nth-child(4) .mask-card-teaser-image { background: #b86b4e; }
.mask-card-teaser:nth-child(5) .mask-card-teaser-image { background: #655b9a; }
.mask-card-teaser:nth-child(6) .mask-card-teaser-image { background: #ab8640; }

.mask-card-teaser-image::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .65);
  font: 700 132px "Kalam", cursive;
  filter: blur(5px);
}

.mask-card-teaser-image span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 16px);
  margin: 0;
  padding: 7px 9px;
  color: #fff;
  background: rgba(8, 15, 53, .82);
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.how-it-works {
  padding: 32px max(24px, calc((100vw - 1460px) / 2)) 42px;
  color: var(--magic-ink);
  background: linear-gradient(180deg, #fffdf7 0%, var(--magic-lilac) 100%);
  border-bottom: 1px solid #c8b8df;
}

.how-it-works > header {
  margin-bottom: 20px;
  text-align: center;
}

.how-it-works h2 {
  font-size: 46px;
  line-height: 1;
}

.how-it-works > header p {
  margin: 4px 0 0;
  color: #4a4d65;
  font-family: Georgia, serif;
  font-size: 17px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1460px;
  margin: 0 auto;
}

.how-grid article {
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(16, 39, 92, .1);
  border-radius: 8px;
}

.how-grid article > img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  background: linear-gradient(180deg, #fffaf1 0%, #eee9ff 100%);
}

.picked-cast-panorama {
  display: block;
  width: min(100%, 1500px);
  height: auto;
  margin: 12px auto 0;
}

.picked-cast-names {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, 1300px);
  margin: 8px auto 0;
  color: var(--magic-ink);
  font-family: "Kalam", cursive;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.how-grid article > div {
  position: relative;
  min-height: 128px;
  padding: 18px 18px 19px 58px;
}

.how-grid article span {
  position: absolute;
  top: 17px;
  left: 17px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--magic-ink);
  background: var(--magic-gold);
  border-radius: 50%;
  font-weight: 900;
}

.how-grid h3 {
  margin: 0;
  color: var(--magic-ink);
  font-family: "Kalam", cursive;
  font-size: 24px;
  line-height: 1.05;
}

.how-grid p {
  margin: 7px 0 0;
  color: #4a4d65;
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .magic-hero {
    min-height: 620px;
  }

  .magic-hero-copy {
    max-width: 50vw;
  }

  .magic-hero h1 {
    font-size: 62px;
  }

  .mask-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .original-cast-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .magic-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-top: 74px;
  }

  .magic-hero-image {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 1.42;
    object-position: 54% center;
  }

  .magic-hero-shade {
    display: none;
  }

  .magic-hero-copy {
    position: relative;
    inset: auto;
    width: auto;
    max-width: none;
    padding: 28px 22px 36px;
    transform: none;
    background: var(--magic-night);
  }

  .magic-hero h1 {
    font-size: 48px;
    line-height: .95;
  }

  .magic-hero-copy > p {
    margin-top: 14px;
    font-size: 18px;
  }

  .magic-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .magic-hero .world-button {
    width: 100%;
    justify-content: center;
  }

  .mask-gallery {
    padding: 27px 0 32px;
  }

  .original-cast {
    padding: 27px 0 32px;
  }

  .original-cast > header {
    padding: 0 20px;
    text-align: left;
  }

  .original-cast h2 {
    font-size: 38px;
  }

  .original-cast > header p {
    font-size: 15px;
  }

  .original-cast-modes {
    margin-left: 20px;
    margin-right: 20px;
  }

  .original-cast-grid {
    grid-auto-columns: 54vw;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding: 0 20px 12px;
    scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .original-cast-grid figure {
    scroll-snap-align: start;
  }

  .mask-gallery-heading {
    display: block;
    padding: 0 20px;
    margin-bottom: 18px;
  }

  .mask-gallery-heading > div {
    text-align: left;
  }

  .mask-gallery h2,
  .how-it-works h2 {
    font-size: 38px;
  }

  .mask-gallery-heading p,
  .how-it-works > header p {
    font-size: 15px;
  }

  .mask-gallery-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% - 40px);
    margin-bottom: 18px;
  }

  .mask-gallery-grid {
    grid-auto-columns: 76vw;
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    padding: 0 20px 12px;
    scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .mask-card {
    grid-template-rows: 205px auto auto auto;
    scroll-snap-align: start;
  }

  .mask-card img {
    height: 205px;
  }

  .mask-card-teaser {
    grid-template-rows: 205px;
  }

  .mask-card-teaser-image {
    height: 205px;
  }

  .how-it-works {
    padding: 28px 0 34px;
  }

  .how-it-works > header {
    padding: 0 20px;
    text-align: left;
  }

  .how-grid {
    grid-auto-columns: 82vw;
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    padding: 0 20px 12px;
    scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .how-grid article {
    scroll-snap-align: start;
  }

  .how-grid article > div {
    min-height: 122px;
  }

  .how-grid article > img {
    height: 210px;
  }

  .sock-doorway {
    min-height: 0;
  }

  .picked-cast-panorama {
    width: calc(100% + 20px);
    max-width: none;
    height: 230px;
    margin-left: -10px;
    object-fit: cover;
    object-position: center;
  }

  .picked-cast-names {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 2px;
    margin-top: 14px;
    font-size: 21px;
  }

  .story-books-scene img {
    height: 250px;
    object-fit: cover;
    object-position: center;
  }
}
