:root {
  --coral: #f2545f;
  --coral-deep: #d63a4e;
  --coral-shadow: #b02840;
  --teal: #35c8d4;
  --teal-deep: #1da5b4;
  --teal-shadow: #0f6e7a;
  --yellow: #ffd23f;
  --yellow-deep: #ffb724;
  --cream: #fff6ea;
  --ink: #3d2b33;
  --ink-soft: #7a5f6b;
  --white: #ffffff;
  --display: "Baloo 2", cursive;
  --body: "Fredoka", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; }

/* ============ bubbly outlined text ============ */
.bubble-text {
  position: relative;
  z-index: 0;
  font-family: var(--display);
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.02em;
  text-shadow: 0 0.09em 0 rgba(176, 40, 64, 0.35);
}
.bubble-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--coral-deep);
  -webkit-text-stroke: 0.16em var(--coral-deep);
  text-shadow: 0 0.12em 0 var(--coral-shadow);
}

/* ============ loading overlay ============ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: url("../img/bg-streaks.jpg") center / cover no-repeat, var(--teal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
  transition: opacity .6s ease, visibility .6s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#loader .game-loading {
  font-size: clamp(44px, 9vw, 96px);
  animation: squish 2.2s ease-in-out infinite;
}
@keyframes squish {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.04, 0.96); }
}
#loader .loading-label {
  font-size: clamp(20px, 3.4vw, 32px);
  margin-top: 8px;
}
.loadbar {
  width: min(520px, 82vw);
  background: var(--white);
  border-radius: 999px;
  padding: 7px;
  box-shadow: 0 6px 0 rgba(176, 40, 64, 0.35), inset 0 2px 4px rgba(0,0,0,.08);
  position: relative;
}
.loadbar .fill {
  height: 34px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe27a 0%, var(--yellow) 45%, var(--yellow-deep) 100%);
  box-shadow: inset 0 -4px 0 rgba(214, 130, 0, 0.35), inset 0 3px 0 rgba(255,255,255,.6);
}
.loadbar .pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--coral-deep);
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
#loader .chaos { font-size: clamp(22px, 3.8vw, 38px); }

/* ============ hero ============ */
.hero {
  position: relative;
  background: url("../img/bg-streaks.jpg") center / cover no-repeat, var(--teal);
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 10px solid var(--coral-deep);
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 120px;
  position: relative;
  z-index: 2;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 4vw, 44px);
  position: relative;
  z-index: 3;
}
.logotype {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  background: rgba(214, 58, 78, 0.85);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(176, 40, 64, 0.5);
}
@media (max-width: 700px) {
  header .cta-wrap { display: none; }
}
header .contact-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--coral-deep);
  background: var(--white);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 9px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(176, 40, 64, 0.4);
  transition: transform .15s;
}
header .contact-link:hover { transform: translateY(-2px) rotate(-1deg); }

.hero-title {
  font-size: clamp(44px, 8.4vw, 104px);
  line-height: 1.04;
  max-width: 14ch;
  opacity: 0;
  transform: scale(.6);
}
.hero-tag {
  margin-top: 26px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 2.8vw, 28px);
  color: var(--white);
  background: rgba(29, 165, 180, 0.75);
  padding: 10px 26px;
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(15, 110, 122, 0.45);
  opacity: 0;
  transform: translateY(24px);
}
.hero-cta {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(24px);
}
body.loaded .hero-title { animation: pop-in .7s cubic-bezier(.25,1.5,.45,1) .15s forwards; }
body.loaded .hero-tag { animation: rise-in .6s cubic-bezier(.2,.9,.3,1.3) .45s forwards; }
body.loaded .hero-cta { animation: rise-in .6s cubic-bezier(.2,.9,.3,1.3) .62s forwards; }
@keyframes pop-in {
  0% { opacity: 0; transform: scale(.6); }
  70% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.015, 0.975); }
}

/* floating items — power-ups drift around the hero */
.float-item {
  position: absolute;
  z-index: 1;
  opacity: 0;
  transform: scale(0);
  filter: drop-shadow(0 10px 14px rgba(120, 20, 40, 0.28));
}
body.loaded .float-item { animation: item-pop .6s cubic-bezier(.25,1.6,.45,1) forwards; }
.float-item img { display: block; width: 100%; animation: drift 5.2s ease-in-out infinite; }
.float-item.i1 { width: clamp(64px, 8vw, 120px);   left: 11%;  top: 15%; }
.float-item.i2 { width: clamp(56px, 7vw, 104px);   right: 13%; top: 12%; }
.float-item.i3 { width: clamp(52px, 6.5vw, 96px);  left: 22%;  top: 44%; }
.float-item.i4 { width: clamp(56px, 7vw, 104px);   right: 22%; top: 48%; }
.float-item.i5 { width: clamp(72px, 9vw, 136px);   left: 6%;   bottom: 12%; }
.float-item.i6 { width: clamp(64px, 8vw, 120px);   right: 6%;  bottom: 14%; }
.float-item.i7 { width: clamp(48px, 6vw, 88px);    left: 4%;   top: 34%; }
.float-item.i8 { width: clamp(52px, 6.5vw, 96px);  right: 4%;  top: 32%; }
body.loaded .float-item.i1 { animation-delay: .85s; }
body.loaded .float-item.i2 { animation-delay: .95s; }
body.loaded .float-item.i3 { animation-delay: 1.05s; }
body.loaded .float-item.i4 { animation-delay: 1.15s; }
body.loaded .float-item.i5 { animation-delay: 1.25s; }
body.loaded .float-item.i6 { animation-delay: 1.35s; }
body.loaded .float-item.i7 { animation-delay: 1.45s; }
body.loaded .float-item.i8 { animation-delay: 1.55s; }
.float-item.i1 img { animation-delay: .3s; }
.float-item.i2 img { animation-delay: 1.6s; animation-duration: 6s; }
.float-item.i3 img { animation-delay: 2.4s; animation-duration: 4.6s; }
.float-item.i4 img { animation-delay: 3.1s; animation-duration: 5.6s; }
.float-item.i5 img { animation-delay: .9s;  animation-duration: 6.4s; }
.float-item.i6 img { animation-delay: 2s;   animation-duration: 4.9s; }
.float-item.i7 img { animation-delay: 3.6s; animation-duration: 5.4s; }
.float-item.i8 img { animation-delay: 1.2s; animation-duration: 6.8s; }
@keyframes item-pop {
  0% { opacity: 0; transform: scale(0) rotate(-20deg); }
  70% { opacity: 1; transform: scale(1.15) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50% { transform: translateY(-26px) rotate(7deg); }
}
@media (max-width: 700px) {
  .float-item.i3, .float-item.i4, .float-item.i7, .float-item.i8 { display: none; }
}

/* ============ buttons ============ */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--white);
  background: linear-gradient(180deg, #ff7a6e 0%, var(--coral) 55%, var(--coral-deep) 100%);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 16px 36px;
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--coral-shadow), 0 12px 22px rgba(176, 40, 64, .3);
  transition: transform .15s, box-shadow .15s;
}

/* copy-to-clipboard CTAs: flip from label to email, then copy on every click */
.cta-wrap { position: relative; display: inline-block; }
.copy-cta { perspective: 640px; }
.copy-cta .flip-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.3, 1.4, .4, 1);
}
.copy-cta:hover .flip-inner,
.copy-cta:focus-visible .flip-inner { transform: rotateX(180deg); }
.copy-cta .face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.copy-cta .face.back { transform: rotateX(180deg); font-size: .82em; letter-spacing: .01em; }
.copy-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.copy-toast.below { bottom: auto; top: calc(100% + 12px); }
.copy-toast.show { animation: toast-pop 1.6s ease forwards; }
@keyframes toast-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.8); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.06); }
  20% { transform: translateX(-50%) translateY(0) scale(1); }
  74% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.95); }
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 9px 0 var(--coral-shadow), 0 16px 26px rgba(176, 40, 64, .3); }
.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--coral-shadow); }
.btn.teal {
  background: linear-gradient(180deg, #5fe0ea 0%, var(--teal) 55%, var(--teal-deep) 100%);
  box-shadow: 0 6px 0 var(--teal-shadow), 0 12px 22px rgba(15, 110, 122, .3);
}
.btn.teal:hover { box-shadow: 0 9px 0 var(--teal-shadow), 0 16px 26px rgba(15, 110, 122, .3); }

/* ============ sections ============ */
.dots-bg {
  background-image: radial-gradient(rgba(242, 84, 95, 0.10) 12%, transparent 13%);
  background-size: 34px 34px;
}

/* game blocks — sticky rail (title + art, moving as one) on the left,
   scrolling game details on the right. The rail pins while the details
   scroll, then releases when the section ends and the next block takes over. */
.game-block { padding: 130px 0 150px; }
.gb-grid {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.2fr;
  gap: clamp(32px, 8vw, 160px);
  align-items: start;
}
.gb-left { align-self: stretch; }
.gb-rail {
  position: sticky;
  top: clamp(40px, 9vh, 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.gb-title {
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.12;
}
.gb-rail img {
  width: min(320px, 22vw);
  transform-origin: bottom center;
  animation: breathe 4.6s ease-in-out infinite;
  filter: drop-shadow(0 16px 18px rgba(120, 20, 40, 0.22));
}
.title-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.status-pill {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
  padding: 7px 18px;
  box-shadow: 0 3px 0 var(--teal-deep);
}
.gb-middle h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--coral-deep);
  line-height: 1;
}
.gb-middle > p { color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.7; margin-bottom: 18px; max-width: 52ch; }
.get-heading {
  font-size: clamp(24px, 2.4vw, 34px);
  margin: 56px 0 30px;
}
.platform-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .gb-grid { grid-template-columns: 1fr; }
  .gb-rail { position: static; }
  .gb-rail img { width: min(230px, 56vw); }
}
.platform-card {
  background: var(--white);
  border-radius: 24px;
  border: 3px solid var(--teal);
  box-shadow: 0 7px 0 rgba(29, 165, 180, .25);
  padding: 30px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform .2s;
}
.platform-card:hover { transform: translateY(-6px); }
.platform-card .p-icon { font-size: 32px; line-height: 1; }
.platform-card h4 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  color: var(--teal-deep);
}
.platform-card p { color: var(--ink-soft); font-size: 13px; max-width: 28ch; }
.qr-frame {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 8px;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 rgba(61, 43, 51, .2);
}
.qr-frame img { width: 100%; image-rendering: pixelated; border-radius: 6px; }
.soon-pill {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  color: var(--coral-deep);
  background: #ffe9ec;
  border: 2px solid var(--coral);
  border-radius: 999px;
  padding: 4px 12px;
}
.platform-card .spacer { flex: 1; }
/* mirrors .qr-frame's box so the Steam button sits level with the QR codes */
.steam-slot {
  height: 138px;
  display: grid;
  place-items: center;
}
.steam-slot .btn { font-size: 15px; padding: 13px 24px; }
.playtest-cta {
  background: var(--white);
  border: 3px dashed var(--teal);
  border-radius: 24px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}
.playtest-cta p { color: var(--ink-soft); font-size: 16px; line-height: 1.7; max-width: 46ch; }
.playtest-cta .btn { font-size: 16px; padding: 14px 28px; white-space: nowrap; }

/* contact band */
.contact-band {
  background: linear-gradient(180deg, var(--coral) 0%, var(--coral-deep) 100%);
  padding: 76px 24px;
  text-align: center;
}
.contact-band h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 42px);
  color: var(--white);
  text-shadow: 0 3px 0 var(--coral-shadow);
  margin-bottom: 26px;
}
.contact-band .btn.white {
  background: var(--white);
  color: var(--coral-deep);
  box-shadow: 0 6px 0 rgba(140, 20, 40, .45);
}

/* footer */
footer {
  background: #34252d;
  color: #cbb4be;
  padding: 30px 24px 38px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  #loader { display: none; }
  .hero-title, .hero-tag, .hero-cta, .float-item { opacity: 1 !important; transform: none !important; animation: none !important; }
  .float-item img, .gb-rail img { animation: none; }
}
