/* Tokens */
:root {
  color-scheme: light;

  --paper: #fbf5e8;
  --ink: #2a2420;
  --muted: #6b5e52;
  --yellow: #ffda2a;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --section-gap: var(--s8);
  --gutter: clamp(1rem, 2.5vw, 2.5rem);

  font-family: Fredoka, 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

[hidden] {
  display: none !important;
}

body {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper) url('../assets/textures/paper-tile.webp') repeat;
  background-size: 416px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

button {
  color: inherit;
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #087a72;
  outline-offset: 5px;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3 {
  line-height: 1.04;
}

h1 {
  font-weight: 700;
}

h2,
h3 {
  font-weight: 600;
}

p {
  line-height: 1.28;
}

section[id] {
  scroll-margin-top: var(--s2);
}

.header-rule,
.section-rule {
  position: relative;
  height: 5px;
  border-top: 1px solid var(--ink);
}

.header-rule .pen,
.section-rule .pen {
  height: 9px;
  top: -4px;
}

.yellow-button {
  position: relative;
  isolation: isolate;
  min-width: 6.8em;
  min-height: 1.65em;
  display: inline-grid;
  place-items: center;
  padding-inline: 0.95em;
  border: 3px solid var(--ink);
  border-radius: 28% / 76%;
  background: var(--yellow);
  font-size: clamp(1.45rem, 4vw, 3.6rem);
  line-height: 1.15;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.yellow-button,
.nav-contact {
  --rest-offset: 0px;

  transform-origin: center;
  transition:
    transform 60ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 60ms ease;
}

@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {
  .yellow-button > span,
  .nav-contact > span,
  .menu-toggle {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }
}

@supports not ((text-box-trim: trim-both) and (text-box-edge: cap alphabetic)) {
  .nav-contact {
    padding-block: 0.04em 0.09em;
  }

  .yellow-button {
    padding-block: 0.01em 0.09em;
  }
}

@media (hover: hover) {
  .yellow-button:hover,
  .nav-contact:hover {
    --rest-offset: -2px;

    transform: translateY(var(--rest-offset));
  }

  .yellow-button:hover {
    filter: brightness(1.03);
  }
}

.yellow-button:active,
.yellow-button.is-down,
.nav-contact:active {
  transform: translateY(2px) scale(0.94);
}

.yellow-button:active,
.yellow-button.is-down {
  filter: brightness(0.9);
}

.yellow-button.is-released {
  animation: release 150ms both;
}

@keyframes release {
  0% {
    transform: translateY(2px) scale(0.94);
    filter: brightness(0.9);
    animation-timing-function: cubic-bezier(0.13, 0.77, 0.35, 1);
  }

  40% {
    transform: scale(1.03);
    filter: brightness(1);
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  100% {
    transform: translateY(var(--rest-offset));
  }
}

[data-drawn] {
  border-color: transparent;
}

.yellow-button[data-drawn] {
  background: transparent;
}

.pen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  color: var(--ink);
}

.nav-contact .pen,
.yellow-button .pen,
.contact .pen,
.game-feature > .pen {
  z-index: -1;
}

.sheet {
  --sheet-gutter: clamp(20px, 6.1vw, 112px);

  width: min(100% - 2 * var(--sheet-gutter), 1540px);
  margin: 0 auto;
  padding: clamp(24px, 3.6vw, 64px) 0 var(--section-gap);
}

.sheet h2 {
  font-size: clamp(2.55rem, 7vw, 7.3rem);
  font-weight: 700;
  letter-spacing: -0.033em;
}

/* Header */
.masthead {
  width: 100%;
  position: relative;
  margin-inline: auto;
  z-index: 2;
}

.masthead-inner {
  min-height: clamp(66px, 6.9vw, 100px);
  width: 100%;
  padding-inline: clamp(16px, 3vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-link {
  display: block;
  width: clamp(126px, 17.4vw, 248px);
}

.home-link img {
  width: 100%;
  height: auto;
}

.navigation {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4.2vw, 3.95rem);
  font-size: clamp(1.08rem, 2.6vw, 2.25rem);
  font-weight: 600;
}

.navigation a {
  text-decoration: none;
}

.navigation a:hover {
  text-decoration: underline;
}

.nav-contact {
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  padding-inline: 0.8em;
  min-height: 1.45em;
  border: 2px solid var(--ink);
  border-radius: 100vw;
}

.nav-contact[data-drawn] {
  border-color: transparent;
}

.menu-toggle {
  background: transparent;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-toggle svg {
  fill: none;
  stroke: currentcolor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.masthead > .header-rule {
  margin-inline: clamp(10px, 1.4vw, 28px);
}

.rope {
  position: absolute;
  width: clamp(47px, 7.4vw, 108px);
  height: auto;
  top: calc(100% - 5px);
  left: calc(63.5% + 4vw);

  /* The knot is at (86, 16) in the 272 × 276 sprite. */
  translate: 0 -5.797%;
  transform-origin: 31.618% 5.797%;
  pointer-events: none;
}

@keyframes rope-sway {
  from {
    transform: rotate(-4deg);
  }

  to {
    transform: rotate(4deg);
  }
}

/* Hero */
.hero {
  --rule-gutter: clamp(10px, 1.4vw, 28px);

  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  padding: clamp(14px, 2svh, 20px) var(--gutter) 11px;
  text-align: center;
  overflow-x: clip;
}

.hero-swing {
  position: absolute;
  top: -5px;
  left: 9.2%;
  width: min(15.4vw, 290px);
  height: auto;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: swing-sway 2.2s ease-in-out infinite alternate;
}

.hero-egg {
  width: min(52vw, 680px);
}

.hero-egg img {
  width: 100%;
  height: auto;
}

.hero-copy {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(5px, 1svh, 10px);
  padding-top: min(8px, 1svh);
}

.hero h1 {
  font-size: clamp(2.1rem, 7.4vw, 7.65rem);
  font-weight: 700;
  letter-spacing: -0.034em;
  text-wrap: balance;
}

.hero-subline {
  color: var(--muted);
  font-size: clamp(1.12rem, 2.45vw, 2.55rem);
}

.hero-note {
  position: relative;
  margin-block: 1px;
  padding: 0.28em 0.74em;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: #fff3ce;
  font-size: clamp(0.9rem, 1.45vw, 1.35rem);
  font-weight: 500;
  transform: rotate(-1deg);
}

.hero-note .pen {
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
}

.hero-rule {
  position: absolute;
  inset: auto var(--rule-gutter) 0;
}

/* Shear from the top edge: the rope knots stay pinned to the header line while the plank swings. */
@keyframes swing-sway {
  from {
    transform: skewX(-2deg);
  }

  to {
    transform: skewX(2deg);
  }
}

/* Parade */
.parade {
  /* The source parade strip is 1080 × 280. */
  align-self: end;
  width: min(58vw, 400px);
  aspect-ratio: 1080 / 280;
  margin-top: clamp(10px, 1.5svh, 15px);
  margin-bottom: -6px;
  position: relative;
  pointer-events: none;
}

.parade-track,
.walker {
  position: absolute;
  inset: 0;
}

.walker {
  --leg-overlap: 15;
}

/* Each walker's offsets and pivot use the source strip and sprite dimensions. */
.walker-egg {
  --body-x: 67;
  --body-y: 80;
  --body-width: 130;
  --body-height: 147;
  --hip-x: 128;
  --hip-y: 219;
  --hip-spacing: 12;
  --leg-width: 37;
  --leg-height: 77;
  --pivot-x: 11;
}

.walker-blueprint {
  --body-x: 292;
  --body-y: 76;
  --body-width: 136;
  --body-height: 149;
  --hip-x: 363;
  --hip-y: 217;
  --hip-spacing: 12;
  --leg-width: 38;
  --leg-height: 79;
  --pivot-x: 13;
}

.walker-clipboard {
  --body-x: 540;
  --body-y: 77;
  --body-width: 151;
  --body-height: 149;
  --hip-x: 594;
  --hip-y: 216;
  --hip-spacing: 11;
  --leg-width: 38;
  --leg-height: 80;
  --pivot-x: 13;
}

.walker-duck {
  --body-x: 742;
  --body-y: 0;
  --body-width: 313;
  --body-height: 235;
  --hip-x: 896;
  --hip-y: 208;
  --hip-spacing: 31;
  --leg-overlap: 0;
  --leg-height: 66;
  --leg-width: 72;
  --pivot-x: 24;
}

.walker-body,
.walker-leg {
  position: absolute;
  height: auto;
}

/* Placements share the dimensions of the source parade strip. */
.walker-body {
  left: calc(var(--body-x) * 100% / 1080);
  top: calc(var(--body-y) * 100% / 280);
  width: calc(var(--body-width) * 100% / 1080);
  transform-origin: calc((var(--hip-x) - var(--body-x)) * 100% / var(--body-width))
    calc((var(--hip-y) - var(--body-y)) * 100% / var(--body-height));
}

.walker-leg {
  /* The cap extends above the hip pivot, so include it in the ankle cut. */
  --leg-cap: calc(var(--leg-overlap) * 100% / var(--leg-height));
  --ankle-cut: calc(var(--leg-cap) + var(--ankle));

  left: calc((var(--hip-x) - var(--pivot-x)) * 100% / 1080);
  top: calc((var(--hip-y) - var(--leg-overlap)) * 100% / 280);
  width: calc(var(--leg-width) * 100% / 1080);
  transform-origin: calc(var(--pivot-x) * 100% / var(--leg-width)) var(--leg-cap);
  transform: skewX(12deg);
}

.walker-leg-back {
  left: calc((var(--hip-x) - var(--pivot-x) - var(--hip-spacing)) * 100% / 1080);
  filter: brightness(0.85);
  transform: skewX(-12deg);
}

.walker-duck .walker-leg {
  transform: rotate(6deg);
}

.walker-shoe {
  display: none;
}

.is-walking .walker-shoe {
  display: block;
  clip-path: inset(var(--ankle-cut) 0 0);
}

.is-walking .walker-leg:not(.walker-shoe) {
  /* The poses align at the cut. Keep the seam overlap inside the shoe's outline. */
  --ankle-overlap: min(1px, 4%);

  clip-path: polygon(
    0 0,
    100% 0,
    100% var(--ankle-cut),
    40% var(--ankle-cut),
    32% calc(var(--ankle-cut) + var(--ankle-overlap)),
    20% calc(var(--ankle-cut) + var(--ankle-overlap)),
    12% var(--ankle-cut),
    0 var(--ankle-cut)
  );
}

.is-walking .walker :is(.walker-body, .walker-leg) {
  transform: var(--pose, none);
}

.is-walking .walker::before,
.is-walking .walker::after {
  content: '';
  position: absolute;
  bottom: 0;
}

.is-walking .walker::before {
  left: calc((var(--hip-x) - var(--hip-spacing) / 2 + 10) * 100% / 1080);
  width: 10%;
  height: 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #4d382e 0%, #4d382e8c 40%, transparent 72%);
  transform: translate(-50%, 50%) scale(var(--shadow-scale, 1));
  opacity: var(--shadow-opacity, 0.28);
}

.is-walking .walker-duck::before {
  width: 14%;
}

.is-walking .walker::after {
  left: calc((var(--hip-x) - var(--hip-spacing)) * 100% / 1080);
  width: 3.4%;
  height: 9%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 23% 62%, #9b785c 0%, transparent 33%),
    radial-gradient(ellipse at 65% 34%, #ad8e6a 0%, transparent 31%),
    radial-gradient(ellipse at 72% 72%, #b49b7b 0%, transparent 38%);
  transform: var(--dust-pose, none);
  opacity: var(--dust-opacity, 0);
}

/* Games */
.games-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--s2), 2.5vw, var(--s5));
  margin-top: clamp(var(--s2), 2.2vw, var(--s4));
}

.game-feature {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: center;
  gap: clamp(var(--s1), 1.5vw, var(--s3));
  padding: clamp(var(--s1), 1.5vw, var(--s3));
  border: 2px solid var(--ink);
  border-radius: 24px;
}

.game-feature-art,
.games-nest-eggs img {
  width: 100%;
  height: auto;
}

.game-feature-copy {
  display: grid;
  justify-items: start;
  gap: var(--s1);
}

.game-feature h3 {
  font-size: clamp(1.9rem, 4.35vw, 4.7rem);
  font-weight: 700;
}

.game-feature p {
  color: var(--muted);
  font-size: clamp(1rem, 1.95vw, 2.05rem);
  font-weight: 500;
}

.game-feature .game-notify {
  margin-top: clamp(0px, 1vw, var(--s2));
  min-height: 44px;
  padding: 0.5em 1.35em;
  border-radius: 100vw;
  font-size: clamp(0.95rem, 1.85vw, 1.95rem);
  text-align: center;
  text-wrap: balance;
}

.games-nest {
  text-align: center;
}

.games-nest h3 {
  font-size: clamp(1.5rem, 3.55vw, 3.8rem);
  text-wrap: balance;
}

.games-nest-eggs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: var(--s1);
  margin: clamp(var(--s1), 1.7vw, var(--s3)) auto 0;
  max-width: 480px;
}

/* About */
.about {
  margin-top: clamp(30px, 3vw, 56px);
}

.about .section-rule {
  margin-inline: calc(var(--gutter) - var(--sheet-gutter));
}

.about h2 {
  margin-top: clamp(16px, 2vw, 32px);
}

.about p {
  margin-top: 0.22em;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.07vw, 2.15rem);
}

.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: clamp(14px, 2vw, 30px);
}

.values li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1.5vw, 24px);
}

.values img {
  width: clamp(58px, 8.65vw, 142px);
  height: clamp(56px, 8vw, 132px);
  object-fit: contain;
}

.values h3 {
  font-size: clamp(1.25rem, 3.05vw, 3.18rem);
}

/* Contact */
.contact {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 21% 1fr 18%;
  align-items: center;
  gap: clamp(6px, 1.5vw, 25px);
  margin-top: clamp(44px, 6vw, 100px);
  padding: clamp(18px, 2.4vw, 40px);
  border: 2px solid var(--ink);
  border-radius: clamp(17px, 4.2vw, 60px);
  text-align: center;
}

.contact h2 {
  font-size: clamp(2.9rem, 8.9vw, 8.7rem);
}

.contact p {
  margin-top: 0.32em;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.07vw, 2.15rem);
}

.contact .yellow-button {
  margin-top: var(--s2);
  font-size: clamp(1.3rem, 3.5vw, 3.35rem);
}

.contact-builder,
.contact-box {
  width: 100%;
  height: auto;
  pointer-events: none;
}

.contact-box {
  align-self: end;
  margin-bottom: 5%;
}

/* Footer */
.footer {
  position: relative;
  width: min(100% - 2 * var(--gutter), 1390px);
  margin: auto auto 0;
  padding: var(--s2) 0 var(--s3);
  display: grid;
  justify-items: center;
  gap: var(--s1);
  text-align: center;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.53vw, 1.28rem);
}

.footer-details {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--s1) var(--s3);
}

.footer .section-rule {
  position: absolute;
  inset: 0 0 auto;
}

.footer img {
  width: clamp(100px, 13vw, 192px);
  height: auto;
}

.footer small {
  font-size: inherit;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Privacy */
.privacy {
  width: min(100% - 2 * var(--gutter), 760px);
  margin: var(--section-gap) auto;
}

.privacy h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.privacy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: var(--s3) 0 var(--s1);
}

.privacy p {
  font-size: clamp(1.07rem, 2vw, 1.23rem);
  line-height: 1.5;
  hyphens: auto;
}

.privacy a {
  overflow-wrap: anywhere;
}

/* Washes */
.heading-wash {
  position: relative;
  isolation: isolate;
  display: inline-block;
}

.heading-wash::before,
.hero::before,
.hero::after,
.game-feature::before,
.contact::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.heading-wash::before {
  inset: 0.12em -0.26em 0.06em;
  background-image: url('../assets/washes/heading-swash.webp');
  opacity: 0.58;
  transform: rotate(var(--wash-angle, -2deg));
}

.about .heading-wash {
  --wash-angle: 1.25deg;
}

.about .heading-wash::before {
  filter: hue-rotate(-110deg) saturate(1.55) brightness(1.035);
}

.contact .heading-wash {
  --wash-angle: -1.4deg;
}

.contact .heading-wash::before {
  filter: hue-rotate(-138deg) saturate(1.5) brightness(1.045);
}

.hero::before {
  left: clamp(18px, 4vw, 80px);
  bottom: 12px;
  width: min(19%, 230px);
  aspect-ratio: 400 / 251;
  background-image: url('../assets/washes/hero-butter.webp');
  opacity: 0.35;
}

.hero::after {
  right: clamp(18px, 4vw, 80px);
  top: clamp(12px, 3vh, 32px);
  width: min(18%, 245px);
  aspect-ratio: 440 / 211;
  background-image: url('../assets/washes/hero-teal.webp');
  opacity: 0.4;
}

.game-feature::before {
  right: clamp(6px, 1.1vw, 17px);
  bottom: clamp(5px, 0.9vw, 14px);
  width: min(27%, 225px);
  aspect-ratio: 448 / 209;
  background-image: url('../assets/washes/game-mint.webp');
  opacity: 0.5;
}

.contact::before {
  top: clamp(7px, 1.3vw, 23px);
  left: clamp(8px, 1.5vw, 27px);
  width: min(18%, 180px);
  aspect-ratio: 360 / 272;
  background-image: url('../assets/washes/contact-peach.webp');
  opacity: 0.42;
}

/* Scrollbar */
html {
  scrollbar-color: #5a4c42 #f4ead8;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f4ead8;
}

::-webkit-scrollbar-thumb {
  background: #5a4c42;
  border-radius: 999px;
  border: 3px solid #f4ead8;
}

::-webkit-scrollbar-thumb:hover {
  background: #f28c28;
}

::-webkit-scrollbar-button {
  display: none;
  height: 0;
}

/* Responsive */
@media (max-width: 640px) {
  :root {
    --gutter: 13px;
    --section-gap: var(--s6);
  }

  .masthead-inner {
    min-height: 56px;
  }

  .home-link {
    width: 126px;
  }

  .navigation {
    gap: 0.82rem;
    font-size: 1.03rem;
  }

  .navigation.is-menu {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    min-width: 145px;
    border: 2px solid var(--ink);
    border-radius: 14px 10px 12px 9px;
    background: var(--paper) url('../assets/textures/paper-tile.webp') center / 416px;
    z-index: 1;
    align-items: stretch;
    text-align: center;
    padding: 0.44rem 0.72rem;
    box-shadow: 2px 3px 0 #2a24201a;
  }

  .navigation.is-menu:not(.is-open) {
    display: none;
  }

  .navigation.is-menu a {
    display: grid;
    place-items: center;
    min-height: 2.55rem;
  }

  .rope {
    width: 51px;
    left: calc(62% + 4vw);
  }

  .hero {
    padding-top: 0;
  }

  .hero::before,
  .hero::after,
  .contact::before {
    content: none;
  }

  .hero-swing {
    position: static;
    justify-self: start;
    width: clamp(100px, 28vw, 145px);
    margin: -5px 0 0 6%;
  }

  .hero-egg {
    width: min(84vw, 408px);
  }

  .hero-copy {
    gap: var(--s1);
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10.8vw, 4rem);
  }

  .hero-subline {
    font-size: clamp(1.04rem, 4.3vw, 1.45rem);
    text-wrap: balance;
  }

  .hero-note {
    font-size: clamp(0.8rem, 3.45vw, 1rem);
  }

  .hero .yellow-button {
    min-width: 8.45em;
  }

  .yellow-button {
    min-height: 44px;
  }

  .sheet {
    --sheet-gutter: 20px;
  }

  .sheet h2 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .games-layout {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }

  .game-feature {
    padding: var(--s1) var(--s2) var(--s2) var(--s1);
  }

  .games-nest-eggs {
    max-width: 340px;
  }

  .values {
    gap: 0.55rem;
  }

  .values li {
    flex-direction: column;
    text-align: center;
  }

  .values h3 {
    font-size: clamp(1rem, 4.15vw, 1.42rem);
  }

  .contact {
    grid-template-columns: 1fr 1fr;
    gap: var(--s2) var(--s1);
    padding: var(--s3) var(--s2) var(--s2);
  }

  .contact-copy {
    grid-area: 1 / 1 / 2 / -1;
  }

  .contact-builder {
    width: 75%;
    max-width: 115px;
    place-self: end start;
  }

  .contact-box {
    width: 58%;
    max-width: 105px;
    justify-self: end;
    margin-bottom: 2%;
  }

  .footer {
    font-size: clamp(0.625rem, 3.125vw, 0.85rem);
  }

  .footer-details {
    column-gap: var(--s1);
  }
}

@media (max-width: 355px) {
  .masthead-inner {
    gap: 0.35rem;
  }

  .navigation {
    gap: 0.48rem;
    font-size: 0.9rem;
  }

  .home-link {
    width: 101px;
  }

  .game-feature {
    grid-template-columns: 1fr;
    padding: var(--s2);
    justify-items: center;
    text-align: center;
  }

  .game-feature-art {
    width: 75%;
  }

  .game-feature-copy {
    justify-items: center;
  }
}

/* Desktop: the first screen ends on the divider under the hero. */
@media (min-width: 900px) {
  .hero {
    --header-h: calc(clamp(66px, 6.9vw, 100px) + 5px);

    min-height: calc(100svh - var(--measured-header-h, var(--header-h)));
    grid-template-rows: minmax(0, 1fr) auto auto;
  }

  .hero-egg {
    position: relative;
    width: min(37vw, 680px);
    min-height: min(21vw, 27svh);
  }

  .hero-egg img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
  }

  .hero h1 {
    font-size: min(clamp(3.15rem, 7.45vw, 8rem), max(3rem, 12svh));
  }

  .hero-subline {
    font-size: min(clamp(1.2rem, 2.48vw, 2.8rem), max(1.2rem, 4.4svh));
  }

  .hero-note {
    font-size: min(clamp(0.9rem, 1.35vw, 1.35rem), max(0.9rem, 2.25svh));
  }

  .hero .yellow-button {
    font-size: min(clamp(1.45rem, 3.2vw, 3.55rem), max(1.45rem, 5svh));
  }

  .parade {
    width: min(29vw, 52svh, 540px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .rope {
    animation: rope-sway 3.2s ease-in-out -1.6s infinite alternate;
  }
}

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

  .yellow-button,
  .nav-contact {
    transition: none;
  }

  .yellow-button:is(:hover, :active, .is-down),
  .nav-contact:is(:hover, :active) {
    transform: none;
  }

  .yellow-button.is-released {
    animation: none;
  }
}
