/* ==========================================================
   Turnip website
   ========================================================== */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #4B3640;
  --ink-soft: #6B4B5B;
  --cream: #FFF6EC;
  --card: #FFF9F2;
  --purple: #B65AC4;
  --purple-deep: #8E3F9C;
  --leaf: #79B856;
  --grass: #8DC85B;
  --grass-dark: #5E9E3C;
  --soil: #7A5236;
  --wood: #C98B4F;
  --sky-top: #4DA8E6;
  --sky-bottom: #A6DBF6;
  --font: 'Fredoka', ui-rounded, 'SF Pro Rounded', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 22px 44px -22px rgba(31, 70, 110, 0.55);
  --gutter: clamp(16px, 4vw, 48px);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky-bottom);
  line-height: 1.45;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

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

.defs {
  position: absolute;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -200px;
  z-index: 100;
  background: var(--cream);
  padding: 0.6em 1em;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  border: 3px solid var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.9rem 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.92);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 1.45rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0s linear 0.3s;
}
.scrolled .topbar-logo,
.page .topbar-logo {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s, transform 0.3s, visibility 0s;
}

.topbar-head {
  display: inline-block;
  width: 1.7rem;
  height: 2rem;
}
.topbar-head svg {
  width: 100%;
  height: 100%;
}

.menu-btn {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 54px;
  height: 54px;
  margin-left: auto;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transition: transform 0.25s;
}
.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}
.menu-btn:hover span:nth-child(1) {
  transform: translateX(-3px);
}
.menu-btn:hover span:nth-child(3) {
  transform: translateX(3px);
}
.menu-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

/* ---------- sidebar menu ---------- */

.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(30, 60, 92, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.menu-open .menu-scrim {
  opacity: 1;
  pointer-events: auto;
}

.menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
  background: var(--cream);
  border-radius: 28px 0 0 28px;
  box-shadow: -20px 0 50px -20px rgba(31, 70, 110, 0.5);
  overflow: hidden auto;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.05), visibility 0s linear 0.4s;
}
.menu-open .menu {
  transform: none;
  visibility: visible;
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.05), visibility 0s;
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.menu-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 1.6rem;
}
.menu-close {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #F3E3D3;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.menu-close svg {
  width: 20px;
  height: 20px;
}
.menu-close:hover {
  background: #EBD3BE;
  transform: rotate(90deg);
}

.menu-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.menu-list a::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
}
.menu-list a:hover {
  background: #F6E5D4;
}
.menu-list a[aria-current='page'] {
  color: var(--purple-deep);
  background: #F4E3F4;
}

.menu-cta {
  align-self: stretch;
}

.menu-label {
  margin: 26px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.menu-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.menu-social a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}
.menu-social a:hover {
  transform: translateX(-4px);
  background: #FDF1F9;
}
.menu-social svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.menu-scene {
  position: relative;
  margin: auto -22px 0;
  padding-top: 24px;
  height: 170px;
  flex: none;
}
.menu-scene::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background: var(--grass);
  border-radius: 50% 50% 0 0 / 30px 30px 0 0;
}
.menu-turnip {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 1;
  width: 150px;
  aspect-ratio: 108 / 100;
  transform: translateX(-50%);
}
.menu-turnip svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.icon-cut {
  fill: #fff;
}

/* ---------- sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
}

.cloud-layer,
.balloon-layer {
  position: absolute;
  inset: 0;
}

.cloud {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.cloud svg {
  width: 100%;
  height: auto;
}
.cloud.far {
  opacity: 0.6;
}

.balloon {
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.balloon-sway {
  transform-origin: 50% 30%;
  animation: balloon-sway 5s ease-in-out infinite;
}
.balloon svg {
  width: 100%;
  height: auto;
}
.balloon.popped .balloon-sway {
  animation: balloon-pop 0.22s ease-out forwards;
}
@keyframes balloon-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}
@keyframes balloon-pop {
  to { transform: scale(1.4); opacity: 0; }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  pointer-events: none;
  animation: confetti 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes confetti {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3); opacity: 0; }
}
.pop-word {
  position: absolute;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  pointer-events: none;
  animation: pop-word 0.8s ease-out forwards;
}
@keyframes pop-word {
  from { transform: translate(-50%, -50%) scale(0.6); }
  30% { transform: translate(-50%, -70%) scale(1.15); }
  to { transform: translate(-50%, -140%) scale(1); opacity: 0; }
}

/* ---------- page content ---------- */

main {
  position: relative;
  z-index: 1;
}
/* Let clicks fall through empty sky to the balloons behind. */
.home main,
.home main section {
  pointer-events: none;
}
.home main a,
.home main button,
.home .card,
.home .signs {
  pointer-events: auto;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 96px 16px 48px;
  text-align: center;
}

.sun {
  position: absolute;
  top: -14vmin;
  right: -10vmin;
  width: 52vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF7CF 0 26%, rgba(255, 244, 190, 0.55) 27%, rgba(255, 244, 190, 0.18) 46%, rgba(255, 244, 190, 0) 68%);
  animation: sun-glow 6s ease-in-out infinite;
}
@keyframes sun-glow {
  50% { transform: scale(1.06); }
}

.hero-content {
  position: relative;
  will-change: transform, opacity;
}

.logo {
  margin: 0;
  font-weight: 600;
  font-size: clamp(5rem, 24vw, 12.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.logo-i {
  position: relative;
  display: inline-block;
}
/* Where the falling turnip sits when the page first loads: above the "ı", like the logo. */
.logo-dot {
  position: absolute;
  left: 50%;
  bottom: 0.5em;
  width: 0.92em;
  aspect-ratio: 108 / 100;
  transform: translateX(-44%);
}

.tagline {
  margin: 0.25em 0 0;
  font-size: clamp(1.35rem, 3.6vw, 2.3rem);
  font-weight: 500;
  color: var(--ink-soft);
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(2.5rem, 9vh, 5rem);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
}
.scroll-cue-label {
  padding: 0.5em 1.2em;
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.9);
  box-shadow: var(--shadow);
}
.scroll-cue-arrow {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 0 4px 0 var(--ink);
  animation: nudge 1.8s ease-in-out infinite;
}
.scroll-cue-arrow svg {
  width: 26px;
  height: 26px;
}
.scroll-cue:hover .scroll-cue-arrow {
  animation-duration: 0.8s;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}

/* ---------- story sections ---------- */

.story {
  min-height: 125vh;
  min-height: 125svh;
  display: flex;
  align-items: center;
  padding: 12vh var(--gutter);
}
.story-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 6vw, 96px);
}
.side-right .story-inner {
  flex-direction: row-reverse;
}

.card {
  position: relative;
  flex: 0 1 35rem;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  will-change: transform, opacity;
}
/* A speech-bubble tail pointing at the turnip. */
.card::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28px;
  height: 34px;
  margin-top: -17px;
  background: var(--card);
}
.side-left .card::after {
  right: -26px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.side-right .card::after {
  left: -26px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple-deep);
}
.eyebrow .num {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 0.85em;
}

.story-text {
  margin: 0;
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 500;
  line-height: 1.4;
}
.story-text strong {
  font-weight: 600;
  color: var(--purple-deep);
}
.hl {
  background: linear-gradient(transparent 60%, rgba(182, 90, 196, 0.26) 0);
  border-radius: 3px;
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.card-actions {
  margin-top: 1.5rem;
}

.anchor {
  flex: none;
  width: clamp(190px, 27vw, 330px);
  aspect-ratio: 108 / 100;
}

/* ---------- the ground ---------- */

.ground {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}

.ground-title {
  position: absolute;
  top: clamp(84px, 15%, 150px);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 600;
  line-height: 1.05;
}

.hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
}
.hills > svg:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.deco {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: calc(var(--s) * 1.5);
  height: auto;
  aspect-ratio: 24 / 16;
  overflow: visible;
}
.deco.flower {
  aspect-ratio: 24 / 34;
}
.deco.sprout {
  aspect-ratio: 44 / 34;
  transform-origin: 50% 90%;
  animation: sprout-wiggle 4s ease-in-out infinite;
}
.deco.sprout:nth-of-type(2n) {
  animation-delay: -1.7s;
}
@keyframes sprout-wiggle {
  0%, 80%, 100% { transform: rotate(0); }
  85% { transform: rotate(-6deg); }
  90% { transform: rotate(5deg); }
  95% { transform: rotate(-2deg); }
}

/* The front hill's peak is 7.5% down from the top of .hills; the turnip's feet are 86% down its box. */
.ground-anchor {
  position: absolute;
  left: 50%;
  bottom: calc(52% * 0.925);
  width: clamp(150px, 30vh, 280px);
  aspect-ratio: 108 / 100;
  transform: translate(-50%, 14%);
}

.signs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 62px;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(8px, 3vw, 44px);
  margin: 0;
  padding: 0 12px;
  list-style: none;
}
.sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transform-origin: 50% 100%;
}
.sign:hover,
.sign:focus-visible {
  animation: sign-wiggle 0.6s ease-in-out;
}
.sign:focus-visible {
  outline: none;
}
.sign:focus-visible .sign-board {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.sign-board {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
  box-shadow: 0 4px 0 rgba(75, 54, 64, 0.3);
}
.sign-board svg {
  width: 1.7em;
  height: 1.7em;
  flex: none;
}
.sign-pilot .sign-board {
  background: var(--purple);
  color: #fff;
}
.sign-post {
  width: 12px;
  height: 34px;
  margin-top: -3px;
  border: 3px solid var(--ink);
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: var(--wood);
}
@keyframes sign-wiggle {
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(4deg); }
  75% { transform: rotate(-2deg); }
}

.soil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--soil);
  color: #FFF1E0;
  font-size: 0.95rem;
  text-align: center;
}
.soil-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  width: 100%;
  height: 12px;
  margin-bottom: -1px;
}
.soil p {
  margin: 0;
  line-height: 52px;
}
.soil a {
  color: #fff;
  text-underline-offset: 3px;
}

/* ---------- the falling turnip ---------- */

.actor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 300px;
  height: 277.78px;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}
.no-js .actor {
  display: none;
}
.actor-tilt,
.actor-boop {
  position: absolute;
  inset: 0;
}
.actor-hit {
  position: absolute;
  left: 28%;
  top: 22%;
  width: 44%;
  height: 58%;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.actor-boop.boop {
  animation: boop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes boop {
  0% { transform: scale(1); }
  25% { transform: scale(1.12, 0.86); }
  60% { transform: scale(0.94, 1.08); }
  100% { transform: scale(1); }
}

.pose {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.82) translateY(4%);
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pose.on {
  opacity: 1;
  transform: none;
}
.pose:not(.on) * {
  animation-play-state: paused !important;
}
.pose svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.boop-bubble {
  position: absolute;
  left: 50%;
  top: 6%;
  padding: 0.15em 0.6em;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font-weight: 600;
  font-size: 34px;
  white-space: nowrap;
  pointer-events: none;
  animation: bubble 1.2s ease-out forwards;
}
@keyframes bubble {
  0% { transform: translate(-50%, -60%) scale(0.4); opacity: 0; }
  15% { transform: translate(-50%, -100%) scale(1.08); opacity: 1; }
  25% { transform: translate(-50%, -100%) scale(1); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -130%) scale(1); opacity: 0; }
}

/* ---------- pose animations (SVG units: 1px = 1 drawing unit) ---------- */

.t-svg .t-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 4.8s infinite;
}
@keyframes blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

/* falling */
.pose-falling .t-speed {
  animation: speed 0.45s ease-in-out infinite alternate;
}
@keyframes speed {
  from { opacity: 0.35; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(1.5px); }
}
.pose-falling .flail-a,
.pose-falling .flail-b,
.pose-falling .kick-a,
.pose-falling .kick-b {
  transform-box: view-box;
  animation: flail 0.5s ease-in-out infinite alternate;
}
.pose-falling .flail-a { transform-origin: 9px 42px; }
.pose-falling .flail-b { transform-origin: 51px 42px; animation-direction: alternate-reverse; }
.pose-falling .kick-a { transform-origin: 25px 58px; animation-duration: 0.4s; }
.pose-falling .kick-b { transform-origin: 35px 58px; animation-duration: 0.4s; animation-direction: alternate-reverse; }
@keyframes flail {
  from { transform: rotate(-12deg); }
  to { transform: rotate(12deg); }
}

/* reading */
.pose-reading .t-bob {
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob {
  50% { transform: translateY(1.2px); }
}
.pose-reading .t-read-eyes {
  animation: read-line 2.6s ease-in-out infinite;
}
@keyframes read-line {
  0% { transform: translateX(-1.3px); }
  42% { transform: translateX(1.3px); }
  50% { transform: translateX(-1.3px); }
  92% { transform: translateX(1.3px); }
  100% { transform: translateX(-1.3px); }
}

/* running */
.pose-running .t-run {
  animation: run-bounce 0.19s ease-in-out infinite alternate;
}
@keyframes run-bounce {
  to { transform: translateY(-2.2px); }
}
.pose-running .run-leg-a,
.pose-running .run-leg-b,
.pose-running .run-arm-a,
.pose-running .run-arm-b {
  transform-box: view-box;
  animation: stride 0.38s ease-in-out infinite alternate;
}
.pose-running .run-leg-a { transform-origin: 26px 57px; }
.pose-running .run-leg-b { transform-origin: 34px 57px; animation-direction: alternate-reverse; }
.pose-running .run-arm-a { transform-origin: 10px 46px; animation-direction: alternate-reverse; }
.pose-running .run-arm-b { transform-origin: 50px 46px; }
@keyframes stride {
  from { transform: rotate(38deg); }
  to { transform: rotate(-38deg); }
}
.pose-running .t-wind {
  stroke-dasharray: 8 6;
  animation: wind 0.5s linear infinite;
}
@keyframes wind {
  to { stroke-dashoffset: 14; }
}
.pose-running .t-sweat {
  animation: sweat 0.9s ease-out infinite;
}
@keyframes sweat {
  from { transform: translate(0, 0); opacity: 1; }
  to { transform: translate(-6px, 3px); opacity: 0; }
}
.pose-running .puff-a,
.pose-running .puff-b {
  transform-box: fill-box;
  transform-origin: center;
  animation: puff 0.76s ease-out infinite;
}
.pose-running .puff-b {
  animation-delay: -0.38s;
}
@keyframes puff {
  from { transform: translateX(4px) scale(0.4); opacity: 1; }
  to { transform: translateX(-6px) scale(1.3); opacity: 0; }
}

/* explorer */
.pose-explorer .t-sway {
  transform-box: view-box;
  transform-origin: 30px 66px;
  animation: sway 4s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2.5deg); }
}
.pose-explorer .t-glass {
  animation: peer 3.6s ease-in-out infinite;
}
@keyframes peer {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-1.5px, -1px); }
  60% { transform: translate(1px, 0.8px); }
}

/* happy */
.pose-happy .t-hop {
  transform-box: view-box;
  transform-origin: 30px 68px;
  animation: hop 0.9s cubic-bezier(0.3, 0, 0.5, 1) infinite;
}
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1.05, 0.95); }
  12% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(0.97, 1.03); }
  88% { transform: translateY(0) scale(1); }
}
.pose-happy .cheer-a,
.pose-happy .cheer-b {
  transform-box: view-box;
  animation: cheer 0.45s ease-in-out infinite alternate;
}
.pose-happy .cheer-a { transform-origin: 9px 42px; }
.pose-happy .cheer-b { transform-origin: 51px 42px; animation-direction: alternate-reverse; }
@keyframes cheer {
  from { transform: rotate(-10deg); }
  to { transform: rotate(10deg); }
}
.t-svg .spk {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 1.6s ease-in-out infinite;
}
.t-svg .spk-b { animation-delay: -0.4s; }
.t-svg .spk-c { animation-delay: -0.8s; }
.t-svg .spk-d { animation-delay: -1.2s; }
@keyframes twinkle {
  0%, 100% { transform: scale(0.5) rotate(0); opacity: 0.6; }
  50% { transform: scale(1.1) rotate(20deg); opacity: 1; }
}

/* waving */
.t-svg .wave-arm {
  transform-box: view-box;
  transform-origin: 51.5px 41px;
  animation: wave 0.55s ease-in-out infinite alternate;
}
@keyframes wave {
  from { transform: rotate(-16deg); }
  to { transform: rotate(14deg); }
}

/* ---------- inner pages (privacy, 404) ---------- */

.page .sky {
  background: linear-gradient(to bottom, #6BB9EC, #CBEBFA);
}
.page main {
  min-height: 100vh;
  padding: 104px var(--gutter) 48px;
}
.doc {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.doc-turnip {
  width: 150px;
  aspect-ratio: 108 / 100;
  margin: -100px auto 0;
}
.doc-turnip svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.doc h1 {
  margin: 0.4rem 0 0.2rem;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}
.doc .updated {
  margin: 0 0 2rem;
  text-align: center;
  color: var(--ink-soft);
}
.doc h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}
.doc p,
.doc li {
  font-size: 1.08rem;
  line-height: 1.6;
}
.doc p {
  margin: 0 0 1rem;
}
.placeholder-note {
  padding: 1rem 1.25rem;
  border: 3px dashed rgba(182, 90, 196, 0.55);
  border-radius: 18px;
  background: #FBEFFB;
  color: var(--purple-deep);
  font-weight: 500;
}
.doc .back {
  margin-top: 2rem;
  text-align: center;
}
.page-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .story {
    min-height: 120vh;
    min-height: 120svh;
  }
  .story-inner,
  .side-right .story-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }
  .anchor {
    order: -1;
    width: clamp(160px, 48vw, 230px);
    align-self: flex-end;
    margin-right: 4%;
  }
  .side-right .anchor {
    align-self: flex-start;
    margin: 0 0 0 4%;
  }
  .card {
    flex: none;
  }
  .card::after {
    top: -22px;
    width: 34px;
    height: 26px;
    margin: 0;
  }
  .side-left .card::after {
    right: 18%;
    left: auto;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }
  .side-right .card::after {
    left: 18%;
    right: auto;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }
  .topbar-logo {
    font-size: 1.25rem;
  }
  .menu-btn {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 560px) {
  .signs {
    bottom: 58px;
    gap: 6px;
    padding: 0 8px;
  }
  .signs li {
    flex: 1 1 0;
    max-width: 96px;
  }
  .sign-board {
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 0.5rem 0.25rem;
    font-size: 0.82rem;
    border-radius: 14px;
  }
  .sign-board svg {
    width: 1.9rem;
    height: 1.9rem;
  }
  .sign-post {
    height: 22px;
  }
  .sign-label-long {
    display: none;
  }
}
@media (min-width: 561px) {
  .sign-label-short {
    display: none;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
