@font-face {
  font-family: Site Sans;
  src: url("assets/body.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Site Sans;
  src: url("assets/bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  src: url("assets/fredoka.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #16364d;
  --ocean: #076485;
  --deep: #075674;
  --cream: #fff9ea;
  --yellow: #ffde5e;
  --mint: #c9f2ce;
  --sky: #86deff;
  --section-space: clamp(46px, 6vw, 84px);
  font: 1rem/1.55 "Site Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  scroll-behavior: smooth;
  scroll-padding-top: 91px;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #6c228b; outline-offset: 4px; }
.wrap { width: min(1150px, calc(100% - 52px)); margin-inline: auto; }
h2, h3, .button { font-family: Fredoka, "Site Sans", sans-serif; font-weight: 700; }
h2 { color: var(--deep); font-size: clamp(2.45rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.02em; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.08; }
.skip { position: fixed; top: 7px; left: 8px; z-index: 20; translate: 0 -160%; background: white; padding: .6rem 1rem; }
.skip:focus { translate: 0; }

.header { position: sticky; top: 0; z-index: 5; background: var(--ocean); color: white; box-shadow: 0 4px 15px #06455d44; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; gap: 12px; }
.brand { display: block; width: 79px; margin-block: 4px; }
.nav { display: flex; gap: clamp(18px, 3.35vw, 46px); align-items: center; }
.nav a, .footer-links a { text-decoration: none; font-weight: 700; }
.nav a:hover, .footer-links a:hover { color: #ffe894; }
.header :focus-visible, .footer :focus-visible { outline-color: var(--yellow); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 45px;
  padding: .6rem 1.18rem;
  border: 0;
  border-radius: 99px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 1.04rem;
  color: #14334a;
  transition: translate .15s ease, box-shadow .15s ease;
}
.watch-triangle, .play-icon::before {
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.play-icon::before { content: ""; }
.button:hover { translate: 0 -2px; }
.button:active { translate: 0 2px; }
.yellow-button { background: var(--yellow); box-shadow: 0 4px 0 #b87919; }
.white-button { background: #fff; box-shadow: 0 4px 0 #528daa; }
.header-watch { justify-self: end; }
.menu-toggle { display: none; }

.hero { background: #73d5fa; }
.hero-inner { position: relative; isolation: isolate; display: grid; justify-items: center; align-items: center; min-height: clamp(410px, 43vw, 618px); overflow: hidden; }
.hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; width: min(37%, 405px); padding: 21px 0 46px; }
.hero-center h1 { width: clamp(185px, 22vw, 300px); }
.hero-center h1 img { width: 100%; filter: drop-shadow(0 6px 0 #12699e39) drop-shadow(0 5px 13px #1e94cb46); }
.hero-center p {
  max-width: 19ch;
  margin-top: 8px;
  color: #114965;
  font: 700 clamp(1.16rem, 2.04vw, 1.66rem)/1.1 Fredoka, "Site Sans", sans-serif;
  text-shadow: 0 1px 0 #e6f9ff;
  text-wrap: balance;
}
.hero-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.hero-links .button { padding-inline: 1rem; }
.hero::after {
  content: "";
  display: block;
  position: relative;
  height: 22px;
  margin-top: -21px;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 100%, var(--cream) 69%, transparent 71%) 0 0 / 58px 42px repeat-x;
  pointer-events: none;
}

.section { padding-block: var(--section-space); }
.section-head { margin-bottom: clamp(22px, 3.5vw, 42px); text-align: center; }
.section-head p { margin-top: .6rem; color: #3f6072; font-size: 1.08rem; }
.episode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.05vw, 25px); }
.episode-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 2px solid var(--card-color);
  box-shadow: 0 5px 0 var(--card-color), 0 14px 27px #6f4f2712;
  transition: translate .16s ease;
}
.episode-card:is(:hover, :focus-within) { translate: 0 -3px; }
.episode-card:focus-within { outline: 3px solid #6c228b; outline-offset: 4px; }
.episode-card:nth-child(10) { grid-column: 2; }
.episode-card.yellow { --card-color: #ffe08b; --tag-color: #6c4a12; }
.episode-card.blue { --card-color: #aee8fb; --tag-color: #154966; }
.episode-card.purple { --card-color: #e2d0ff; --tag-color: #583478; }
.episode-card.pink { --card-color: #ffc9dc; --tag-color: #6d2945; }
.episode-card.mint { --card-color: #bfebc5; --tag-color: #235a41; }
.episode-thumb { position: relative; background: var(--card-color); }
.episode-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.play-icon {
  position: absolute;
  display: grid;
  place-items: center;
  right: 13px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding-left: 2px;
  background: #fff9e9;
  color: #124e65;
  border: 2px solid white;
  box-shadow: 0 3px 9px #102f4955;
}
.episode-info { padding: 14px 17px 19px; min-height: 105px; }
.episode-number {
  display: inline-block;
  margin-bottom: .4rem;
  padding: .13rem .58rem;
  border-radius: 999px;
  background: var(--card-color);
  color: var(--tag-color);
  font-size: .77rem;
  font-weight: 700;
}
.episode-link { text-decoration: none; }
.episode-link:focus-visible { outline: 0; }
.episode-link::after { content: ""; position: absolute; inset: 0; }

.characters {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #c9f7f0, #e5f3ff 53%, #eadeff);
}
.star { position: absolute; z-index: -1; line-height: 1; pointer-events: none; font-size: clamp(3rem, 9vw, 8rem); }
.star-one { color: #fffef4; top: 10px; left: 4vw; rotate: -16deg; }
.star-two { color: #fff2a4; top: 32px; right: 7vw; rotate: 13deg; }
.character-grid { display: grid; gap: clamp(13px, 2.05vw, 25px); }
.character-grid.leads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.character-grid.friends { margin-top: clamp(13px, 2.05vw, 25px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.character-card {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border-radius: 24px;
  border: 2px solid #fff;
  box-shadow: 0 9px 19px #24465d16;
}
.character-card img { width: 100%; height: 100%; object-fit: cover; align-self: stretch; }
.character-card div { padding: clamp(13px, 2vw, 28px); }
.character-card h3 { margin-bottom: .5rem; }
.character-card p { line-height: 1.4; font-size: .95rem; }
.nia-card { background: #ffe59e; }
.toto-card { background: #c7f3cb; }
.snaggle-card { background: #e4d5ff; }
.lila-card { background: #ffdaea; }
.nova-card { background: #c2edfb; }
.friends .character-card { grid-template-columns: 1fr; align-content: start; }
.friends .character-card img { aspect-ratio: 1.52; object-position: center 5%; }

.about { background: var(--cream); }
.about-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(22px, 5vw, 68px); }
.about-inner img { border: 5px solid white; border-radius: 30px; box-shadow: 0 6px 0 #b9e5aa; }
.about p { margin-top: .9rem; max-width: 52ch; color: #35596a; font-size: 1.08rem; }
.text-link { display: inline-block; margin-top: .9rem; font-weight: 700; text-underline-offset: .2em; }
.footer { padding-block: 14px; background: #125772; color: white; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 17px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px clamp(14px, 3vw, 31px); }

.play { padding-block: 36px; background: #ffe9af; }
.play-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(18px, 5vw, 58px); }
.play h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.play-copy > p { margin-top: .45rem; }
.play-copy .clue { display: inline-block; margin-top: .8rem; padding: .43rem .75rem; background: #fff9ea; border-radius: 12px; }
.spots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spot { display: grid; place-content: center; justify-items: center; min-height: 72px; padding: .35rem; border: 2px solid #dca748; border-radius: 17px; background: #fff9ea; color: var(--ink); font-weight: 700; }
.spot span { font-size: 1.7rem; }
.spot:hover:not(:disabled) { background: #fff0a4; }
.spot.guessed { border-style: dashed; }
.spot.found { border-color: #13785b; background: var(--mint); }
.spot:disabled { cursor: default; }
.game-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: .65rem; min-height: 40px; }
.game-status { font-weight: 700; }
.next { min-height: 34px; padding: .25rem .75rem; background: var(--yellow); box-shadow: 0 3px 0 #b87919; }

.episode-player {
  width: min(900px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 16px 60px #0a233466;
}
.episode-player::backdrop { background: #0a2334cb; }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 15px; }
.player-head h2 { font-size: clamp(1.25rem, 3.7vw, 1.8rem); }
.player-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #d9f3f9; color: var(--ink); font-size: 1.75rem; line-height: 1; }
.player-video { display: grid; place-items: center; background: #0a2334; }
.player-video iframe { display: block; width: min(100%, calc((100dvh - 147px) * 16 / 9)); aspect-ratio: 16 / 9; min-height: 190px; border: 0; }
.player-footer { padding: 11px 16px; text-align: right; font-weight: 700; }
html:has(.episode-player[open]) { overflow: hidden; }

@media (max-width: 900px) {
  .hero-links { flex-direction: column; gap: 9px; align-items: center; margin-top: 14px; }
  .hero-center { padding-bottom: 21px; }
  .character-card { grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); }
}
@media (max-width: 680px) {
  :root { scroll-padding-top: 75px; }
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; grid-template-columns: 1fr auto auto; gap: 9px; }
  .header .brand { width: 62px; }
  .header-watch { min-height: 37px; padding-inline: .8rem; font-size: .94rem; }
  .nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--ocean); box-shadow: 0 8px 9px #06455d44; padding: 15px 20px 20px; flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: .55rem; }
  .header-inner:has(.menu-toggle[aria-expanded="true"]) .nav { display: flex; }
  .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: #ffffff22; color: #fff; border-radius: 12px; font-size: 1.6rem; }
  .hero-inner { grid-template-areas: "picture" "center"; min-height: 0; align-items: start; overflow: visible; }
  .hero-art { grid-area: picture; position: static; width: 100%; height: auto; aspect-ratio: 1.9; object-fit: cover; }
  .hero-center { grid-area: center; z-index: 0; align-self: start; width: 100%; padding: 11px 14px 36px; background: #b7efff; }
  .hero-center h1 { grid-area: picture; position: absolute; top: clamp(9px, 4vw, 26px); left: 50%; translate: -50% 0; width: clamp(96px, 26%, 174px); }
  .hero-center p { max-width: 28ch; margin: 0; font-size: 1.18rem; }
  .hero-links { flex-direction: row; margin-top: 11px; }
  .hero-links .button { min-height: 40px; padding-inline: .8rem; font-size: .94rem; }
  .hero::after { height: 15px; margin-top: -14px; background-size: 44px 30px; }
  .episode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .episode-card:nth-child(10) { grid-column: auto; }
  .episode-card { border-radius: 17px; }
  .episode-info { min-height: 91px; padding: 10px 10px 12px; }
  .episode-card h3 { font-size: clamp(1.12rem, 4.2vw, 1.35rem); }
  .play-icon { width: 31px; height: 31px; right: 7px; bottom: 6px; font-size: .75rem; }
  .character-grid.leads, .character-grid.friends { grid-template-columns: 1fr; }
  .friends .character-card { grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); }
  .friends .character-card img { aspect-ratio: 1; }
  .character-card img { max-height: 205px; }
  .about-inner, .play-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
  .footer .brand { width: 63px; }
}
@media (max-width: 345px) {
  .hero-links { gap: 6px; }
  .hero-links .button { padding-inline: .6rem; font-size: .9rem; }
  .episode-info { min-height: 106px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
