/* Clochette and the Great Wind-Up: the game's own palette (pink hoodie, golden bell, plum outline, lilac hair,
   sunset sky) and its fonts (Luckiest Guy for titles, Fredoka for text, Dela Gothic One for the cheers). */
@font-face { font-family: "Luckiest Guy"; src: url("assets/fonts/LuckiestGuy-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("assets/fonts/Fredoka-Bold.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Dela Cheers"; src: url("assets/fonts/DelaGothicOne-Cheers.ttf") format("truetype"); font-display: swap; }

:root {
  --plum: #45214d;
  --plum-deep: #24102b;
  --plum-soft: #6b3a73;
  --pink: #ffb6cf;
  --pink-hot: #ff6fa8;
  --pink-pale: #ffe3ee;
  --gold: #ffd25a;
  --gold-deep: #f2a12e;
  --lilac: #b99cf2;
  --cream: #fff6ee;
  --sky: #8fd6ff;
  --ink: #3a1d40;
  --radius: 28px;
  --shadow: 0 18px 40px -18px rgba(36, 16, 43, .55);
  --display: "Luckiest Guy", "Fredoka", system-ui, sans-serif;
  --text: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--text); font-weight: 500; color: var(--ink); background: var(--plum-deep);
  font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
b { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---------- type ---------- */
.kicker {
  font-family: var(--text); font-weight: 700; font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--pink-hot); margin: 0 0 10px;
}
.title {
  font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 86px); line-height: .95; margin: 0 0 18px;
  color: var(--gold); letter-spacing: .01em;
  -webkit-text-stroke: 10px var(--plum); paint-order: stroke fill;
  text-shadow: 0 7px 0 var(--plum), 0 12px 24px rgba(36, 16, 43, .35);
}
.title--small { font-size: clamp(34px, 4.4vw, 52px); -webkit-text-stroke-width: 8px; text-shadow: 0 5px 0 var(--plum); }
.lead { font-size: clamp(19px, 2vw, 22px); max-width: 700px; margin: 0 auto; text-wrap: balance; }
/* 27/11: never one lonely word on the last line ("again." alone): balanced titles and intros, no orphan in text */
.title, .kicker, h3, .hero__tagline, .world h3 { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
.head { text-align: center; margin-bottom: 56px; }
.link { font-weight: 700; color: var(--pink-hot); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- buttons: the game's pink pills with cat ears ---------- */
.btn {
  --bg: linear-gradient(180deg, #ffc6da 0%, var(--pink) 45%, #ff8fbb 100%);
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 16px 30px 15px;
  font-family: var(--display); font-size: 22px; letter-spacing: .03em; color: var(--plum); text-decoration: none;
  background: var(--bg); border: 4px solid var(--plum); border-radius: 999px; cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(69, 33, 77, .18), inset 0 4px 0 rgba(255, 255, 255, .6), 0 6px 0 var(--plum);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn:hover { transform: translateY(-3px); box-shadow: inset 0 -5px 0 rgba(69, 33, 77, .18), inset 0 4px 0 rgba(255,255,255,.6), 0 9px 0 var(--plum); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 -5px 0 rgba(69, 33, 77, .18), 0 2px 0 var(--plum); }
.btn--cat::before, .btn--cat::after {
  content: ""; position: absolute; top: -16px; width: 22px; height: 20px; background: var(--plum);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); transition: transform .2s ease;
}
.btn--cat::before { left: 22px; transform: rotate(-12deg); }
.btn--cat::after { right: 22px; transform: rotate(12deg); }
.btn--cat:hover::before { transform: rotate(-22deg) translateY(-2px); }
.btn--cat:hover::after { transform: rotate(22deg) translateY(-2px); }
.btn--ghost { --bg: rgba(255, 246, 238, .92); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px); transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
  background: linear-gradient(180deg, rgba(36, 16, 43, .55) 0%, rgba(36, 16, 43, 0) 100%);
}
.nav.is-solid { background: rgba(36, 16, 43, .88); backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0,0,0,.25); padding-block: 10px; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font-family: var(--display); font-size: 26px;
  -webkit-text-stroke: 5px var(--plum); paint-order: stroke fill; }
.nav__brand img { border-radius: 12px; border: 3px solid var(--plum); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { color: var(--cream); text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; transition: background .2s; text-shadow: 0 2px 6px rgba(36,16,43,.6); }
.nav__links a:hover { background: rgba(255, 182, 207, .22); }
.nav__badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--gold); color: var(--plum); border: 3px solid var(--plum); border-radius: 999px; padding: 6px 14px; white-space: nowrap;
}
.nav__badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--pink-hot); box-shadow: 0 0 0 0 var(--pink-hot); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(255, 111, 168, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 111, 168, 0); } }
.nav__burger { display: none; background: var(--pink); border: 3px solid var(--plum); border-radius: 14px; width: 48px; height: 44px; padding: 8px; cursor: pointer; }
.nav__burger span { display: block; height: 3px; background: var(--plum); margin: 4px 0; border-radius: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; background: #f9b9a8; }
.hero__art { position: absolute; inset: 0; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transform-origin: 50% 0; animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 58%;
  background: linear-gradient(180deg, rgba(36,16,43,0) 0%, rgba(36,16,43,.55) 55%, var(--plum-deep) 100%); pointer-events: none;
}
.hero__sparkles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero__content { position: relative; z-index: 2; text-align: center; padding: 0 20px clamp(70px, 10vh, 120px); color: var(--cream); }
.hero__content .kicker { display: inline-block; color: var(--gold); background: rgba(36, 16, 43, .78); border: 3px solid var(--plum); padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; }
.hero__tagline {
  font-family: var(--display); font-size: clamp(40px, 6.4vw, 84px); line-height: .98; margin: 0 0 30px; color: var(--cream);
  -webkit-text-stroke: 10px var(--plum); paint-order: stroke fill; text-shadow: 0 7px 0 var(--plum), 0 16px 40px rgba(0,0,0,.4);
}
.hero__tagline span { color: var(--gold); }
.hero__cta { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.hero__status { margin: 28px 0 0; font-size: 16px; opacity: .92; }
.hero__status b { color: var(--gold); }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 20px; width: 30px; height: 48px; margin-left: -15px; border: 3px solid var(--cream); border-radius: 20px; opacity: .8; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; margin-left: -3px; background: var(--gold); border-radius: 3px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(18px); opacity: 0; } }

/* ---------- ribbon ---------- */
.ribbon { background: var(--gold); border-block: 4px solid var(--plum); overflow: hidden; transform: rotate(-1.2deg); margin: -14px -10px 0; position: relative; z-index: 3; }
.ribbon__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ribbon span { font-family: var(--display); font-size: 22px; color: var(--plum); padding: 12px 26px; white-space: nowrap; }
.ribbon span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 52px; background: var(--pink-hot); border: 3px solid var(--plum); border-radius: 50%; vertical-align: 1px; }
@keyframes marquee { to { transform: translateX(-33.333%); } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(90px, 12vw, 150px) 0; }
.section--plum { background: radial-gradient(1200px 600px at 50% 0%, var(--plum-soft) 0%, var(--plum) 45%, var(--plum-deep) 100%); color: var(--cream); }
.section--plum .lead, .section--night .lead { color: #f4e3f6; }
.section--sunset { background: linear-gradient(180deg, #ffd9c2 0%, #ffc1d3 55%, #f7b2e0 100%); }
.section--cream { background: var(--cream); }
.section--sky { background: linear-gradient(180deg, #bfe8ff 0%, #e8f7ff 60%, var(--cream) 100%); }
.section--night { background: radial-gradient(900px 500px at 80% 0%, #4b2a7a 0%, #261544 50%, #140b26 100%); color: var(--cream); }
.section::before {
  /* a soft scalloped edge, like the game's menu frames */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 26px; pointer-events: none;
  background: radial-gradient(circle at 20px -6px, var(--edge, transparent) 22px, transparent 23px) 0 0 / 40px 26px repeat-x;
}
.section--sunset::before { --edge: var(--plum-deep); }
.section--cream::before { --edge: #f7b2e0; }
.section--sky::before { --edge: var(--cream); }
#trailer::before { --edge: transparent; }
#story::before { --edge: var(--plum-deep); }
#worlds::before { --edge: #e8f7ff; }
#bosses::before { --edge: var(--plum-deep); }
#status::before { --edge: var(--cream); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- trailer ---------- */
.screen { position: relative; max-width: 1040px; margin: 0 auto; }
.screen__frame {
  position: relative; border-radius: 34px; padding: 14px; background: linear-gradient(180deg, #ffd8e6, var(--pink));
  border: 5px solid var(--plum); box-shadow: 0 12px 0 var(--plum), 0 40px 80px -30px #000;
}
.screen__frame video { width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; background: #000; border: 4px solid var(--plum); }
.screen__play {
  position: absolute; inset: 0; margin: auto; width: 116px; height: 116px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 45%, var(--gold-deep)); border: 6px solid var(--plum);
  box-shadow: 0 8px 0 var(--plum), 0 0 0 0 rgba(255, 210, 90, .7); animation: glow 2.2s infinite; transition: transform .2s;
}
.screen__play svg { width: 54px; height: 54px; fill: var(--plum); margin-left: 8px; }
.screen__play:hover { transform: scale(1.08) rotate(-4deg); }
.screen.is-playing .screen__play { display: none; }
@keyframes glow { 70% { box-shadow: 0 8px 0 var(--plum), 0 0 0 26px rgba(255, 210, 90, 0); } 100% { box-shadow: 0 8px 0 var(--plum), 0 0 0 0 rgba(255, 210, 90, 0); } }
.screen__bell {
  position: absolute; top: -34px; left: 50%; width: 64px; height: 64px; margin-left: -32px;
  background: radial-gradient(circle at 40% 35%, #fff3b0 0 12%, var(--gold) 30%, var(--gold-deep) 70%);
  border: 5px solid var(--plum); border-radius: 50% 50% 46% 46%; animation: ring 3.2s ease-in-out infinite; transform-origin: 50% 0;
}
.screen__bell::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--plum); }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 89% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }

.opening { display: grid; grid-template-columns: 1fr 1.25fr; gap: 50px; align-items: center; margin-top: 110px; }
.opening__text p:not(.kicker) { color: #f4e3f6; }
.yt { position: relative; border-radius: 24px; overflow: hidden; border: 5px solid var(--plum); box-shadow: 0 10px 0 var(--plum-deep), var(--shadow); background: #000; aspect-ratio: 16 / 9; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.yt:hover img { transform: scale(1.05); }
.yt iframe { width: 100%; height: 100%; border: 0; }
.yt__play { position: absolute; inset: 0; margin: auto; width: 86px; height: 60px; border-radius: 18px; border: 4px solid var(--plum); background: var(--pink-hot); cursor: pointer; }
.yt__play svg { width: 34px; height: 34px; fill: #fff; margin: auto; }

/* ---------- story ---------- */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.story__art img { border-radius: var(--radius); border: 5px solid var(--plum); box-shadow: 0 12px 0 var(--plum), var(--shadow); transform: rotate(-2deg); transition: transform .5s ease; }
.story__art img:hover { transform: rotate(0) scale(1.02); }
.story__text .lead { margin: 0 0 16px; }
.baron { display: flex; align-items: center; gap: 18px; margin-top: 26px; background: rgba(69, 33, 77, .92); color: var(--cream); padding: 14px 22px 14px 14px; border-radius: 22px; border: 4px solid var(--plum); }
.baron img { width: 110px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); animation: bob 2.6s ease-in-out infinite; }
.baron b { display: block; font-family: var(--display); font-size: 24px; font-weight: 400; color: var(--gold); letter-spacing: .02em; }
.baron span { font-size: 16px; opacity: .9; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- heroine ---------- */
.hero-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; background: #fff; border: 5px solid var(--plum); border-radius: 36px; padding: 34px; box-shadow: 0 12px 0 var(--plum), var(--shadow); }
.moods__pics { position: relative; aspect-ratio: 1; border-radius: 26px; overflow: hidden; border: 4px solid var(--plum); background: #ffd0dd; }
.moods__pics img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .45s ease, transform .6s ease; }
.moods__pics img.is-on { opacity: 1; transform: none; }
.moods__tabs { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.moods__tabs button { font-family: var(--text); font-weight: 700; font-size: 16px; padding: 9px 18px; border-radius: 999px; border: 3px solid var(--plum); background: var(--pink-pale); color: var(--plum); cursor: pointer; transition: background .2s, transform .2s; }
.moods__tabs button[aria-selected="true"] { background: var(--gold); transform: translateY(-2px); box-shadow: 0 4px 0 var(--plum); }
.moves { position: relative; }
.moves__sprite { width: min(250px, 50%); margin: -10px auto 10px; image-rendering: pixelated; filter: drop-shadow(0 10px 0 rgba(69,33,77,.15)); animation: bob 2.4s ease-in-out infinite; }
.moves__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.moves__list li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; padding: 12px 16px; border-radius: 18px; background: var(--pink-pale); }
.moves__list li::before { content: ""; grid-row: span 2; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; border: 3px solid var(--plum);
  background: radial-gradient(circle at 40% 35%, #fff3b0 0 12%, var(--gold) 34%, var(--gold-deep) 80%); }
.moves__list b { font-family: var(--display); font-weight: 400; font-size: 21px; color: var(--plum); letter-spacing: .02em; }
.moves__list span { font-size: 16px; color: #5d3a63; }
.kitten { display: flex; align-items: center; gap: 30px; max-width: 760px; margin: 60px auto 0; }
.kitten img { width: 170px; flex: none; image-rendering: pixelated; animation: hop 1.2s ease-in-out infinite; }
.kitten p { margin: 0; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-3deg); } }

/* ---------- gameplay ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.mode { background: #fff; border: 4px solid var(--plum); border-radius: 26px; overflow: hidden; box-shadow: 0 8px 0 var(--plum); transition: transform .3s ease, box-shadow .3s ease; }
.mode:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 16px 0 var(--plum); }
.mode video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; image-rendering: pixelated; border-bottom: 4px solid var(--plum); }
.mode__text { padding: 18px 22px 22px; }
.mode h3 { font-family: var(--display); font-weight: 400; font-size: 27px; margin: 0 0 6px; color: var(--plum); letter-spacing: .02em; }
.mode p { margin: 0; font-size: 16px; color: #5d3a63; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 0; margin: 60px 0 0; }
.facts li { text-align: center; background: var(--plum); color: var(--cream); border-radius: 22px; padding: 18px 10px; border: 4px solid var(--plum-deep); }
.facts b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--gold); letter-spacing: .02em; }
.facts span { font-size: 15px; opacity: .9; }

/* ---------- worlds ---------- */
.worlds { display: grid; gap: 40px; }
.world { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; background: rgba(255, 246, 238, .06); border: 4px solid rgba(255, 182, 207, .35); border-radius: 32px; overflow: hidden; }
.world:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.world:nth-child(even) .world__map { order: 2; }
.world__map { overflow: hidden; }
.world__map img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, filter 1.2s ease; filter: saturate(.25) brightness(.95); }
.world.is-in .world__map img { filter: saturate(1.08); }
.world:hover .world__map img { transform: scale(1.06); }
.world__body { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.world__num { font-weight: 700; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--pink); }
.world h3 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.6vw, 48px); line-height: 1; margin: 0; color: var(--gold); -webkit-text-stroke: 7px var(--plum-deep); paint-order: stroke fill; }
.world p { margin: 0; color: #f4e3f6; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0; }
.tags li { font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255, 182, 207, .16); color: var(--pink-pale); border: 2px solid rgba(255, 182, 207, .35); }
.state { align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; padding: 6px 14px; border: 3px solid var(--plum-deep); }
.state--done { background: #9ef0a8; color: #154a22; }
.state--wip { background: var(--gold); color: var(--plum); }

/* ---------- bosses ---------- */
.bosses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.boss { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 4px solid rgba(185, 156, 242, .45); border-radius: 30px; padding: 22px 22px 26px; text-align: center; overflow: hidden; transition: transform .3s ease, border-color .3s; }
.boss:hover { transform: translateY(-8px); border-color: var(--gold); }
.boss__stage { aspect-ratio: 1.15; border-radius: 22px; display: grid; place-items: center; overflow: hidden; border: 4px solid var(--plum-deep); }
.boss__stage--forest { background: radial-gradient(circle at 50% 80%, #9be38f, #4f9e5b 70%); }
.boss__stage--sky { background: radial-gradient(circle at 50% 30%, #e4f6ff, #84c9f4 75%); }
.boss__stage--yellow { background: #f4c21c; }
.boss__stage img { width: 74%; image-rendering: pixelated; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.boss__stage--yellow img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.boss:hover .boss__stage img { transform: scale(1.08) rotate(-3deg); }
.boss__stage--yellow img, .boss:hover .boss__stage--yellow img { transform: none; }
.boss__title { width: 88%; margin: 18px auto 8px; }
.boss p { margin: 0; font-size: 16px; color: #e9dcf5; }
.boss .boss__credit { margin-top: 10px; font-size: 14px; color: var(--pink); letter-spacing: .03em; }
.boss__credit b { color: var(--gold); }
.boss__cheer {
  position: absolute; top: 24%; left: 50%; font-family: "Dela Cheers", var(--display); font-size: 54px; white-space: nowrap; pointer-events: none;
  color: var(--gold); -webkit-text-stroke: 8px var(--plum); paint-order: stroke fill; text-shadow: 0 6px 0 var(--plum);
  transform: translate(-50%, -50%) scale(3) rotate(-10deg); opacity: 0;
}
.boss.is-cheering .boss__cheer { animation: slam 1.5s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes slam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(3.2) rotate(-10deg); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(.92) rotate(-10deg); }
  20% { transform: translate(-50%, -50%) scale(1.08, .9) rotate(-10deg); }
  32%, 78% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-10deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6) rotate(4deg); }
}
.foes { display: flex; justify-content: center; gap: 40px; margin-top: 60px; flex-wrap: wrap; }
.foes figure { margin: 0; text-align: center; }
.foes img { width: 110px; height: 110px; object-fit: contain; image-rendering: pixelated; margin: 0 auto 8px; animation: bob 2.4s ease-in-out infinite; }
.foes figure:nth-child(2) img { animation-delay: -.8s; }
.foes figure:nth-child(3) img { animation-delay: -1.6s; }
.foes figcaption { font-size: 15px; font-weight: 700; color: var(--pink); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery button { padding: 0; border: 4px solid var(--plum); border-radius: 18px; overflow: hidden; cursor: zoom-in; background: #000; box-shadow: 0 6px 0 var(--plum); transition: transform .25s ease; }
.gallery button:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }
.gallery button:hover { transform: translateY(-5px) rotate(-.8deg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; image-rendering: pixelated; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20, 8, 26, .94); display: grid; place-items: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 16px; border: 5px solid var(--pink); image-rendering: pixelated; }
.lightbox button { position: absolute; background: var(--pink); border: 4px solid var(--plum); color: var(--plum); font-size: 34px; line-height: 1; width: 56px; height: 56px; border-radius: 50%; cursor: pointer; font-weight: 700; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; }
.lightbox__nav--next { right: 20px; top: 50%; }

/* ---------- soundtrack + status ---------- */
.status { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: stretch; }
.music, .dev { background: rgba(255, 246, 238, .78); border: 5px solid var(--plum); border-radius: 34px; padding: 36px; box-shadow: 0 10px 0 var(--plum); }
.music { text-align: center; display: flex; flex-direction: column; align-items: center; }
.music__dance { width: 150px; margin-top: auto; padding-top: 20px; image-rendering: pixelated; animation: hop 1.1s ease-in-out infinite; }
.record.is-playing ~ .music__dance { animation-duration: .35s; }
#gallery::before { --edge: #140b26; }
.record { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; background: none; border: 0; cursor: pointer; margin-top: 10px; font-family: var(--display); font-size: 22px; color: var(--plum); }
.record__disc { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; border: 5px solid var(--plum);
  background: repeating-radial-gradient(circle, #3a1d40 0 3px, #2a1230 3px 6px); box-shadow: 0 8px 0 var(--plum); }
.record__disc img { width: 82px; height: 82px; border-radius: 50%; border: 4px solid var(--gold); }
.record.is-playing .record__disc { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bars { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.bars span { font-weight: 700; }
.bars b { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--pink-hot); }
.bars i { grid-column: 1 / -1; height: 18px; border-radius: 999px; border: 3px solid var(--plum); background: #fff; overflow: hidden; position: relative; }
.bars i::after { content: ""; position: absolute; inset: 0; width: 0; border-radius: 999px; transition: width 1.6s cubic-bezier(.2, .8, .2, 1);
  background: repeating-linear-gradient(-45deg, var(--pink-hot) 0 10px, var(--pink) 10px 20px); }
.dev.is-in .bars i::after { width: var(--v); }
.platforms { font-size: 16px; }
.dev__cta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- footer ---------- */
.footer { background: var(--plum-deep); color: #d9c6e0; padding: 70px 0 50px; text-align: center; border-top: 5px solid var(--plum); }
.footer__logos { display: flex; justify-content: center; align-items: center; gap: 50px; flex-wrap: wrap; margin-bottom: 26px; }
.footer__studio { width: 200px; border-radius: 20px; }
.footer__godot { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #cfe6f5; gap: 4px; }
.footer__godot small { font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
.footer__godot img { width: 190px; }
.footer__title { font-family: var(--display); font-size: 28px; color: var(--gold); margin: 0 0 8px; }
.footer p { max-width: 720px; margin: 0 auto 10px; font-size: 15px; }
.footer__credits { font-size: 13px !important; opacity: .75; }
.footer__copy { font-size: 13px !important; opacity: .6; }

/* ---------- contact page ---------- */
.contact { min-height: 100vh; padding-top: 150px; }
.contact::before { display: none; }
.contact__in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contact__intro .lead { margin: 0 0 24px; }
.contact__mascot { width: 200px; image-rendering: pixelated; animation: hop 1.3s ease-in-out infinite; margin: 10px 0 20px; }
.contact__notes { padding-left: 20px; margin: 0; font-size: 16px; }
.contact__notes li { margin-bottom: 8px; }
.form { position: relative; display: grid; gap: 18px; background: #fff; border: 5px solid var(--plum); border-radius: 34px; padding: 40px 36px 34px; box-shadow: 0 12px 0 var(--plum), var(--shadow); }
.form__ears::before, .form__ears::after { content: ""; position: absolute; top: -40px; width: 54px; height: 44px; background: var(--plum); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.form__ears::before { left: 40px; transform: rotate(-10deg); }
.form__ears::after { right: 40px; transform: rotate(10deg); }
.form label { display: grid; gap: 6px; font-weight: 700; color: var(--plum); font-size: 16px; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 500; font-size: 17px; color: var(--ink); background: var(--pink-pale); border: 3px solid var(--plum);
  border-radius: 16px; padding: 12px 16px; width: 100%; transition: background .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 150px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 4px var(--gold); }
.form__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { margin: 0; font-size: 14px; color: #7a5a80; }
.form .btn { justify-self: start; margin-top: 10px; }
.form .btn:disabled { opacity: .7; cursor: wait; }
.form__status { margin: 0; font-weight: 700; min-height: 1.6em; }
.form__status.is-ok { color: #1f7a3a; }
.form__status.is-error { color: #c2185b; }
.form.is-sent .btn { background: #9ef0a8; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; position: fixed; inset: 70px 16px auto; flex-direction: column; background: var(--plum); border: 4px solid var(--plum-deep); border-radius: 24px; padding: 14px; }
  .nav__links.is-open { display: flex; }
  .nav__burger { display: block; margin-left: auto; }
  .nav__badge { display: none; }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  body { font-size: 17px; }
  .story, .opening, .hero-card, .status, .world, .world:nth-child(even), .contact__in { grid-template-columns: 1fr; }
  .contact { padding-top: 110px; }
  .form { padding: 34px 20px 26px; }
  .world:nth-child(even) .world__map { order: 0; }
  .world__map img { aspect-ratio: 16 / 9; }
  .world__body { padding: 26px; }
  .bosses { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .modes { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .hero-card { padding: 20px; }
  .kitten { flex-direction: column; text-align: center; }
  .opening { margin-top: 80px; }
}
@media (max-width: 820px) and (orientation: portrait) {
  /* phones: the whole key art on top (its logo readable), the words and buttons under it */
  .hero { min-height: 0; display: block; background: var(--plum-deep); padding-top: 64px; }
  .hero__art { position: relative; }
  .hero__art img { height: auto; animation: none; }
  .hero__art::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(180deg, rgba(36,16,43,0), var(--plum-deep)); }
  .hero::after { display: none; }
  .hero__content { padding: 10px 18px 90px; margin-top: -30px; }
  .hero__sparkles { height: 60%; }
  .nav { background: rgba(36, 16, 43, .9); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
