/* The fixed sky behind the day, and the opening scene. */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); }
.sun { transition: opacity .4s ease; position: absolute; left: 0; top: 0; width: var(--sun-size, 34vmin); height: var(--sun-size, 34vmin); margin: calc(var(--sun-size, 34vmin) / -2) 0 0 calc(var(--sun-size, 34vmin) / -2); transform: translate(var(--sun-x, 74vw), var(--sun-y, 56vh)); will-change: transform; }
.sun svg { width: 100%; height: 100%; overflow: visible; }
.sun circle { fill: #ffe14d; stroke: var(--ink); stroke-width: 5; transition: stroke .4s ease; }
.sun .sun-gloss { fill: #fff6c2; stroke: none; }
.sun-rays path { fill: #ffbe1f; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; transition: stroke .4s ease; }
.sun-rays { transform-origin: 0 0; animation: spin 40s linear infinite; }
.sun-face { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; transition: opacity .3s ease; }
/* After the opening scene the sun drifts behind the words, so it softens to a glow they can be read over. */
.sun-soft .sun { opacity: .62; }
.sun-soft .sun circle, .sun-soft .sun-rays path { stroke: transparent; }
.sun-soft .sun-face, .sun-soft .sun-gloss { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.moon { position: absolute; left: 0; top: 0; width: 22vmin; height: 22vmin; margin: -11vmin 0 0 -11vmin; transform: translate(var(--moon-x, 80vw), var(--moon-y, 120vh)); will-change: transform; }
.stars { position: absolute; inset: 0; opacity: var(--stars, 0); background-image:
  radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(3px 3px at 27% 62%, #fff, transparent),
  radial-gradient(2px 2px at 41% 31%, #fff, transparent), radial-gradient(3px 3px at 58% 12%, #ffe9a8, transparent),
  radial-gradient(2px 2px at 66% 48%, #fff, transparent), radial-gradient(3px 3px at 83% 27%, #fff, transparent),
  radial-gradient(2px 2px at 91% 71%, #ffe9a8, transparent), radial-gradient(2px 2px at 7% 83%, #fff, transparent),
  radial-gradient(3px 3px at 35% 88%, #ffe9a8, transparent), radial-gradient(2px 2px at 74% 86%, #fff, transparent),
  radial-gradient(2px 2px at 50% 70%, #fff, transparent), radial-gradient(3px 3px at 18% 42%, #ffe9a8, transparent); }

/* Paw prints left on the sky by the mouse. */
.paw { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; background: var(--ink); animation: paw 1.1s ease-out forwards;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='6.5' ry='5.5'/%3E%3Ccircle cx='5' cy='10' r='2.6'/%3E%3Ccircle cx='9.500' cy='5.500' r='2.6'/%3E%3Ccircle cx='14.500' cy='5.500' r='2.6'/%3E%3Ccircle cx='19' cy='10' r='2.600'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16' rx='6.5' ry='5.5'/%3E%3Ccircle cx='5' cy='10' r='2.6'/%3E%3Ccircle cx='9.500' cy='5.500' r='2.6'/%3E%3Ccircle cx='14.500' cy='5.500' r='2.6'/%3E%3Ccircle cx='19' cy='10' r='2.600'/%3E%3C/svg%3E") center / contain no-repeat; }
.is-night .paw { background: var(--cream); }
@keyframes paw { 0% { opacity: .22; transform: scale(.7); } 100% { opacity: 0; transform: scale(1); } }

/* The poster: giant lettering top left, Teddy bottom right, standing on the grass and looking into the page. */
.hero {
  position: relative; min-height: 100svh; display: grid; overflow: clip;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(68px, 9vh, 92px) var(--gutter) 0;
}
.hero-type { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 1; }
.hero-title { font-size: min(21vw, 27svh); line-height: 1; display: block; font-weight: 900; }
.hero-title .plrow { display: flex; }
.hero-title > span { display: block; width: fit-content; }
.hero-plops { margin-left: .22em; margin-top: -.13em; --pl-fill: #27c6d9; --pl-shade: #0f8ca3; }
.hero-teddy { --pl-fill: var(--cream); --pl-shade: var(--shade); }
.hero-copy { grid-column: 1; grid-row: 2; align-self: end; position: relative; z-index: 3; padding: clamp(10px, 2vh, 24px) 0 clamp(20px, 4vh, 44px); max-width: min(30em, 41vw); }
.hero-lead { font-size: clamp(24px, 2.7vw, 40px); font-weight: 900; line-height: 1.08; letter-spacing: -.01em; }
.hero-sub { margin-top: .5em; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 1em; }
.hero-note { font-weight: 800; font-size: .92em; }

.hero-stage { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-grass { z-index: 0; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(90px, 16vh, 170px); background: #62c23a; border-top: 5px solid var(--ink); border-radius: 50% 50% 0 0 / 34px 34px 0 0; transform: scaleX(1.1); }
.hero-grass::after { content: ""; position: absolute; inset: 14px 0 auto; height: 10px; background: radial-gradient(circle at 10px 0, #8ddd55 7px, transparent 8px) 0 0 / 34px 12px repeat-x; }
.hero-teddy-spot { position: absolute; right: clamp(10px, 5.5vw, 110px); bottom: clamp(22px, 4.6vh, 52px); width: min(41vw, 72svh); pointer-events: auto; z-index: 3; }
.hero-teddy-spot .pp { cursor: pointer; }
.hero-still { position: absolute; right: 8vw; bottom: 9vh; width: min(26vw, 40svh); height: auto; }

.hero-toys { position: absolute; z-index: 4; left: 45.5%; bottom: clamp(10px, 3vh, 34px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: auto; }
.biscuit { display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; font-weight: 800; font-size: 15px; -webkit-tap-highlight-color: transparent; }
.biscuit img { width: clamp(70px, 7vw, 104px); height: auto; animation: wiggle 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(58, 26, 18, .25)); }
.biscuit span { margin-top: 2px; padding: 3px 12px; background: var(--cream); border: 3px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.biscuit.gone { visibility: hidden; }
.biscuit:active { cursor: grabbing; }
@keyframes wiggle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg) translateY(-4px); } }
.biscuit-fly { position: fixed; z-index: 30; width: 84px; pointer-events: none; }
.hero-hint { position: absolute; z-index: 9; left: 21.5%; bottom: 76%; translate: -50% 0; width: max-content; max-width: min(250px, 60vw); padding: 7px 14px; font-weight: 900; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.15; text-align: center; color: var(--cream); background: var(--ink); border-radius: 16px; pointer-events: none; transition: opacity .15s ease; }
.hero-hint::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 18px; height: 18px; background: var(--ink); border-radius: 3px; transform: translateX(-50%) rotate(45deg); z-index: -1; }
.hero-hint:empty { opacity: 0; }

.heart { position: absolute; pointer-events: none; }
.heart { z-index: 8; font-size: clamp(22px, 2.4vw, 36px); color: #ff5c86; -webkit-text-stroke: 2px var(--ink); font-weight: 900; line-height: 1; }

@media (max-height: 860px) and (min-width: 861px) { .hero-sub { display: none; } }

/* Phone and small tablet: type, then copy, then Teddy, all in one tall scene. */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(36svh, 1fr); padding-top: 66px; }
  .hero-title { font-size: min(27.4vw, 25svh); }
  .hero-plops { margin-left: .12em; }
  .hero-copy { grid-row: 2; padding: 8px 0 0; max-width: none; }
  .hero-lead { font-size: clamp(24px, 7vw, 40px); }
  .hero-cta .btn-big { min-height: 56px; font-size: 1.05em; }
  .hero-sub { display: none; }
  .hero-stage { position: relative; grid-column: 1; grid-row: 3; inset: auto; margin: 0 calc(var(--gutter) * -1); min-height: 36svh; }
  .hero-teddy-spot { right: 0; bottom: 6%; width: min(80vw, 48svh); }
  .hero-toys { left: 3%; bottom: 3%; align-items: flex-start; }
  .biscuit img { width: 64px; }
  .biscuit span { font-size: 12px; padding: 1px 8px; border-width: 2px; }
}

@media (max-width: 860px) and (max-height: 640px) { .hero-teddy-spot { width: 38svh; } .hero-hint { bottom: 70%; } }

/* The opening: Teddy and his things pop up as the letters land. As the page moves on, the type lifts away faster than he does. */
html.js .hero-teddy-spot { animation: rise .7s var(--bounce) .25s both; }
html.js .hero-toys { animation: rise .6s var(--bounce) .75s both; }
@keyframes rise { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }
@supports (animation-timeline: scroll()) {
  .hero-title { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  @keyframes lift { to { transform: translateY(-12vh); } }
}
@media (prefers-reduced-motion: reduce) { .hero-title { animation: none; } }
