:root {
  --ink: #111111;
  --sky: #79c4ea;
  --paper: #ffffff;
  --red: #e10600;
  --blue: #1c6dd0;
  --yellow: #ffe14d;
  --green: #3cb44a;
  --stroke: 5px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: Fredoka, system-ui, sans-serif;
  background: var(--sky);
}

.scene {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(4.5rem, 10vw, 6rem) 1.25rem 2rem;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 5.5rem;
  height: 5.5rem;
  background: var(--yellow);
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
}

.cloud {
  position: absolute;
  height: 2.7rem;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  border-radius: 999px;
}

.cloud--one {
  top: 1.6rem;
  right: 8%;
  width: 8.5rem;
}

.cloud--two {
  top: 5.2rem;
  right: 18%;
  width: 5.5rem;
  height: 2.2rem;
}

.card {
  position: relative;
  z-index: 1;
  width: min(92vw, 36rem);
  padding: 1.4rem 1.4rem 1.5rem;
  text-align: center;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

.nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.85rem;
  border: 4px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--yellow);
}

.bunny {
  position: relative;
  width: 7.5rem;
  height: 8.4rem;
  margin: 0.35rem auto 0.15rem;
  animation: hop 2.8s ease-in-out infinite;
}

.ears {
  display: flex;
  justify-content: center;
  gap: 1.15rem;
}

.ears span {
  width: 2rem;
  height: 3.7rem;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 1.2rem 1.2rem 0 0;
}

.ears span:first-child {
  transform: rotate(-14deg);
  transform-origin: bottom center;
}

.ears span:last-child {
  transform: rotate(14deg);
  transform-origin: bottom center;
}

.face {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 6.1rem;
  height: 5.6rem;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
}

.eye {
  position: absolute;
  top: 2.05rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--ink);
  border-radius: 50%;
}

.eye--left {
  left: 1.7rem;
}

.eye--right {
  right: 1.7rem;
}

.mouth {
  position: absolute;
  top: 3.15rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  transform: translateX(-50%);
}

.mouth::before,
.mouth::after {
  content: "";
  position: absolute;
  left: 0.38rem;
  width: 3px;
  height: 0.9rem;
  background: var(--ink);
  border-radius: 1px;
}

.mouth::before {
  transform: rotate(45deg);
}

.mouth::after {
  transform: rotate(-45deg);
}

.eyebrow {
  margin: 0.35rem 0 0.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

h1 {
  margin: 0;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.line,
.name {
  display: block;
}

.line {
  font-size: clamp(2.5rem, 8vw, 4.1rem);
}

.name {
  margin-top: 0.15rem;
  font-size: clamp(2.15rem, 7vw, 3.45rem);
  color: var(--red);
}

.lede {
  margin: 0.85rem auto 0;
  max-width: 22rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.35;
}

.celebration {
  margin: 1.15rem auto 0;
  max-width: 20rem;
  padding: 0.65rem 1rem 0.75rem;
  background: var(--yellow);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  animation: wiggle 1.8s ease-in-out infinite;
}

.celebration[hidden],
.confetti[hidden] {
  display: none;
}

.celebration-text {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--red);
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -2rem;
  left: var(--x);
  width: 0.75rem;
  height: 1.1rem;
  background: var(--c);
  border: 3px solid var(--ink);
  animation: fall var(--d) linear var(--delay) infinite;
}

.counter {
  margin: 1.15rem auto 0;
  max-width: 20rem;
}

.counter-label {
  margin: 0 0 0.55rem;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.counter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.counter--wide {
  max-width: 28rem;
}

.counter-grid--four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 420px) {
  .counter-grid--four {
    grid-template-columns: 1fr 1fr;
  }
}

.counter-cell {
  padding: 0.55rem 0.4rem 0.6rem;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.counter-value {
  display: block;
  font-size: clamp(2rem, 7vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}

.counter-unit {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.gif-stage {
  margin: 1.15rem 0 0;
}

.miffy-gif {
  display: block;
  width: min(70vw, 250px);
  height: auto;
  margin: 0 auto;
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  animation: bob 3.4s ease-in-out infinite;
}

.ground {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.4rem, 3vw, 2.25rem);
  min-height: 9.5rem;
  padding: 0 0.75rem;
  background: var(--green);
  border-top: var(--stroke) solid var(--ink);
  overflow: hidden;
}

.flower {
  position: relative;
  width: 4rem;
  height: 7.4rem;
  flex: 0 0 auto;
}

.petal,
.center {
  position: absolute;
  border: 4px solid var(--ink);
  border-radius: 50%;
}

.petal {
  width: 1.65rem;
  height: 1.65rem;
  background: var(--petal, var(--red));
}

.petal:nth-child(1) {
  left: 1.18rem;
  top: 0;
}

.petal:nth-child(2) {
  left: 2.35rem;
  top: 1.18rem;
}

.petal:nth-child(3) {
  left: 1.18rem;
  top: 2.35rem;
}

.petal:nth-child(4) {
  left: 0;
  top: 1.18rem;
}

.center {
  z-index: 1;
  left: 1.32rem;
  top: 1.32rem;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--yellow);
}

.flower--red {
  --petal: var(--red);
}

.flower--blue {
  --petal: var(--blue);
}

.flower--yellow {
  --petal: var(--yellow);
}

.flower--yellow .center {
  background: var(--red);
}

.stem {
  position: absolute;
  left: 1.72rem;
  top: 3.85rem;
  width: 0.45rem;
  height: 3.4rem;
  background: var(--ink);
}

@keyframes hop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-2deg) scale(1);
  }
  50% {
    transform: rotate(2deg) scale(1.04);
  }
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(110vh) rotate(540deg);
  }
}

@media (max-width: 720px) {
  .cloud {
    display: none;
  }

  .sun {
    width: 3.6rem;
    height: 3.6rem;
    top: 0.8rem;
    left: 0.8rem;
  }

  .scene {
    padding-top: 5.2rem;
  }
}

@media (max-width: 420px) {
  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .flower:nth-child(4),
  .flower:nth-child(5) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bunny,
  .miffy-gif,
  .celebration {
    animation: none;
  }

  .confetti {
    display: none;
  }
}
