:root {
  color-scheme: light dark;

  --paper: #fff4d6;
  --card: #ffffff;
  --ink: #1c1442;
  --ink-soft: #4b4270;
  --accent: #c7301c;
  --accent-hover: #8f200f;
  --edge: #1c1442;
  --hard: #1c1442;
  --dots: rgb(28 20 66 / 0.09);

  --header: #ffd33d;
  --header-ink: #1c1442;
  --badge-bg: #1c1442;
  --badge-ink: #ffd33d;

  --title-shadow: #ffd33d;
  --ribbon-bg: #c7301c;
  --ribbon-ink: #ffffff;

  --cel-sky: #7fd1f5;
  --cel-sun: #ffd33d;
  --cel-pink: #ffa6c1;
  --cel-ink: #1c1442;
  --cel-link: #14308a;

  --art-red: #ef4a2f;
  --art-cream: #fff4d6;
  --art-line: #1c1442;

  --font-display: "Lilita One", "Arial Rounded MT Bold", "Chalkboard SE", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Avenir Next", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15103a;
    --card: #231b52;
    --ink: #fff4d6;
    --ink-soft: #cfc6ea;
    --accent: #ff9a7a;
    --accent-hover: #ffc0aa;
    --edge: #fff4d6;
    --hard: #07051a;
    --dots: rgb(255 244 214 / 0.07);

    --title-shadow: #ef4a2f;
    --ribbon-bg: #ffd33d;
    --ribbon-ink: #1c1442;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Halftone dots sit behind the page as their own layer, so the text colors are always
   judged against the flat paper color. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, var(--dots) 2px, transparent 2.5px);
  background-size: 18px 18px;
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  border: 3px solid var(--edge);
  border-radius: 10px;
  background: var(--header);
  color: var(--header-ink);
  font-family: var(--font-body);
  font-weight: 800;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 2rem;
  }
}

/* Header: a yellow title bar with an ink underline */

.site-header {
  background: var(--header);
  border-bottom: 4px solid var(--hard);
  color: var(--header-ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header a:focus-visible {
  outline-color: var(--header-ink);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--header-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.2;
}

.wordmark:hover {
  color: var(--header-ink);
}

.wordmark img {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Hero */

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 3rem;
    padding: 5rem 0;
  }
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero > div {
  container-type: inline-size;
}

/* Never splits a word. "Cartoon" is the wider word at about 3.42em in Lilita One, so capping
   the size at 26cqi keeps it to roughly 89% of the column, with room for the hard shadow. */
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 6.5rem);
  font-size: min(clamp(3rem, 14vw, 6.5rem), 26cqi);
  line-height: 1;
  filter: drop-shadow(0.04em 0.05em 0 var(--title-shadow));
  overflow-wrap: normal;
  hyphens: none;
}

.hero h1 span {
  display: block;
  color: var(--accent);
}

.pitch {
  max-width: 32rem;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 3.4vw, 1.3rem);
  line-height: 1.55;
}

/* A ribbon with swallowtail ends */

.ribbon {
  display: inline-block;
  margin: 2rem 0 0;
  max-width: 100%;
  padding: 0.55rem clamp(1.4rem, 8vw, 2.2rem) 0.5rem;
  background: var(--ribbon-bg);
  color: var(--ribbon-ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.9rem) 50%, 100% 100%, 0 100%, 0.9rem 50%);
  transform-origin: left center;
  transform: rotate(-2deg);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  animation: wobble 2.8s ease-in-out infinite;
}

@keyframes wobble {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

/* Title card illustration */

.titlecard {
  justify-self: center;
  width: min(100%, 18rem);
}

@media (min-width: 52rem) {
  .titlecard {
    width: min(100%, 22rem);
  }
}

.titlecard svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.titlecard .card-edge {
  fill: none;
  stroke: var(--edge);
  stroke-width: 6;
}

.titlecard .ring-a {
  fill: var(--art-red);
}

.titlecard .ring-b {
  fill: var(--art-cream);
}

.titlecard .ring-c {
  fill: var(--cel-sun);
}

.titlecard .ring-d {
  fill: var(--cel-sky);
}

.titlecard .ring-e {
  fill: var(--art-cream);
}

.titlecard .ring-lines circle {
  fill: none;
  stroke: var(--art-line);
  stroke-width: 4;
}

.titlecard .dots circle {
  fill: rgb(28 20 66 / 0.14);
}

.titlecard .halftone {
  fill: rgb(28 20 66 / 0.14);
}

.titlecard .ground {
  fill: #5bbf6a;
}

.titlecard .ground-line {
  fill: none;
  stroke: var(--art-line);
  stroke-width: 5;
}

.titlecard .star path {
  fill: var(--cel-sun);
  stroke: var(--art-line);
  stroke-width: 4;
  stroke-linejoin: round;
}

.titlecard .star {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 2.4s ease-in-out infinite;
}

.titlecard .star-2 {
  animation-delay: -1.2s;
}

@keyframes twinkle {
  0%,
  100% {
    scale: 1;
    rotate: 0deg;
  }
  50% {
    scale: 1.2;
    rotate: 14deg;
  }
}

.titlecard .shadow {
  fill: rgb(28 20 66 / 0.35);
  transform-origin: 160px 262px;
  animation: shadow 1.4s linear infinite;
}

.titlecard .ball {
  transform-origin: 160px 262px;
  animation: bounce 1.4s linear infinite;
}

.titlecard .body {
  fill: var(--art-red);
}

.titlecard .body,
.titlecard .arm,
.titlecard .glove,
.titlecard .shoe,
.titlecard .eye,
.titlecard .smile {
  stroke: var(--art-line);
  stroke-width: 5;
  stroke-linecap: round;
}

.titlecard .arm,
.titlecard .smile {
  fill: none;
}

.titlecard .glove,
.titlecard .eye {
  fill: #ffffff;
}

.titlecard .shoe {
  fill: var(--cel-sun);
}

.titlecard .eye {
  stroke-width: 4;
}

.titlecard .shine {
  fill: #ffffff;
  opacity: 0.7;
}

.titlecard .pupil {
  fill: var(--art-line);
}

/* Squash on the ground, stretch in the air, round at the top */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0) scale(1.2, 0.8);
    animation-timing-function: ease-out;
  }
  12% {
    transform: translateY(-26px) scale(0.92, 1.12);
    animation-timing-function: ease-out;
  }
  50% {
    transform: translateY(-96px) scale(1, 1);
    animation-timing-function: ease-in;
  }
  88% {
    transform: translateY(-26px) scale(0.92, 1.12);
    animation-timing-function: ease-in;
  }
}

@keyframes shadow {
  0%,
  100% {
    transform: scale(1.15, 1);
    opacity: 1;
  }
  50% {
    transform: scale(0.55, 0.7);
    opacity: 0.5;
  }
}

/* Schedule board */

.schedule-section {
  padding: 0 0 3.5rem;
}

.section-label {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule {
  padding: 1.6rem 1.25rem 1.5rem;
  border: 4px solid var(--edge);
  border-radius: 22px;
  background: var(--cel-sky);
  box-shadow: 8px 8px 0 var(--hard);
  color: var(--cel-ink);
  text-align: center;
}

.schedule-top {
  margin: 0 0 0.6rem;
  font-weight: 800;
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.program {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7.5vw, 2.3rem);
  line-height: 1.15;
}

.program li {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.program li + li::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border: 3px solid var(--cel-ink);
  border-radius: 50%;
  background: var(--cel-sun);
}

@media (max-width: 56rem) {
  .program {
    flex-direction: column;
    align-items: center;
  }

  .program li + li::before {
    display: none;
  }
}

/* Three cards */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin: 0 0 4rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 44rem) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cards li {
  padding: 1.4rem 1.3rem 1.3rem;
  border: 4px solid var(--edge);
  border-radius: 20px;
  background: var(--cel-sun);
  box-shadow: 6px 6px 0 var(--hard);
  color: var(--cel-ink);
  overflow-wrap: anywhere;
}

.cards li:nth-child(2) {
  background: var(--cel-pink);
}

.cards li:nth-child(3) {
  background: var(--cel-sky);
}

.cards h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.1;
}

.cards p {
  margin: 0;
  font-size: 1rem;
}

.cards a {
  color: var(--cel-link);
  font-weight: 800;
}

.cards a:hover {
  color: var(--cel-ink);
}

.cards a:focus-visible {
  outline-color: var(--cel-ink);
}

/* Siblings */

.siblings {
  margin: 0 0 4rem;
  padding: 2rem 0 0;
  border-top: 3px dashed var(--edge);
  text-align: center;
}

.siblings ul {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .siblings ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.siblings li {
  position: relative;
  padding: 1.4rem 1.2rem;
  border: 3px solid var(--edge);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--hard);
}

.siblings li:has(a:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.siblings h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 4.5vw, 1.5rem);
  line-height: 1.2;
}

/* The whole card is the link target */
.siblings h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.siblings h3 a:focus-visible {
  outline: none;
}

.siblings p {
  margin: 0;
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Prose pages */

.prose {
  max-width: 40rem;
  padding: 3rem 0 4rem;
}

.prose h1 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.5rem);
  line-height: 1.05;
  filter: drop-shadow(0.05em 0.06em 0 var(--title-shadow));
}

.prose h2 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.1;
}

.prose p {
  margin: 0 0 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .ribbon {
    animation: none;
  }

  .titlecard .ball,
  .titlecard .shadow,
  .titlecard .star {
    animation: none;
  }
}
