/* Woke Busters: one page, one 3D canvas behind everything, cartoon UI on top. */
@font-face { font-family: "Lilita One"; src: url("../fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "VT323"; src: url("../fonts/VT323-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #2a1f3d;
  --cream: #fff1d0;
  --pink: #ff5fb0;
  --yellow: #ffd23f;
  --cyan: #5fd8ff;
  --green: #8fe056;
  --purple: #8e5bd9;
  --red: #ff4d5e;
  --sky: #8fc8f5;
  --vh: 1vh;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(#3f8fe8 0%, #8fc8f5 45%, #bfe6ff 100%) fixed;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Layers ------------------------------------------------------------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100lvh; height: 100vh; display: block; z-index: 0; }
@supports (height: 100lvh) { #gl { height: 100lvh; } }
.no-webgl #gl { display: none; }
.no-webgl body, body.no-webgl { background: url("../img/hero_key_art.png") center 30% / cover fixed, var(--sky); }
main { position: relative; z-index: 1; }
#fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }

/* Outlined cartoon text */
.toon-text, .pitch-text, .play-title, .scroll-hint, .footer-kicker, .loader-line {
  font-family: "Lilita One", "Arial Black", sans-serif;
  color: #fff;
  -webkit-text-stroke: 0.1em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--ink);
  letter-spacing: 0.01em;
}

/* ---- Loader ----------------------------------------------------------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: radial-gradient(circle at 50% 40%, #bfe6ff, #3f8fe8 75%);
  transition: opacity .5s ease, visibility .5s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-logo { width: min(80vw, 560px); animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(42,31,61,.35)); }
.loader-bar { width: min(70vw, 420px); height: 26px; border: 5px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; box-shadow: 0 5px 0 var(--ink); }
.loader-bar i { display: block; height: 100%; width: 0%; background: repeating-linear-gradient(-45deg, var(--pink) 0 14px, #ff8fc8 14px 28px); transition: width .25s ease; animation: barber 0.6s linear infinite; }
.loader-line { font-size: clamp(18px, 3.4vw, 26px); margin: 0; min-height: 1.3em; }
@keyframes barber { to { background-position: 40px 0; } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1deg); } }

/* ---- Sound button ------------------------------------------------------- */
.sound-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid var(--ink); background: #fff; box-shadow: 0 4px 0 var(--ink);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: transform .15s ease, background .15s;
}
.sound-btn svg { width: 26px; height: 26px; }
.sound-btn .on { display: none; }
.sound-btn[aria-pressed="true"] { background: var(--yellow); }
.sound-btn[aria-pressed="true"] .on { display: block; }
.sound-btn[aria-pressed="true"] .off { display: none; }
.sound-btn:hover { transform: translateY(-2px) rotate(-6deg); }

/* ---- Hero --------------------------------------------------------------- */
#hero { height: 420vh; position: relative; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding-top: max(10px, 1.6vh);
  overflow: hidden;
}
.suck { will-change: transform; }

.studio { position: relative; display: block; width: clamp(64px, 7.2vw, 108px); line-height: 0; z-index: 3; filter: drop-shadow(0 3px 0 rgba(42,31,61,.55)); }
.studio img { width: 100%; height: auto; position: relative; }
/* The flame flickers: a warm glow behind the candle's tip only. */
.studio-glow { position: absolute; left: 47.5%; top: 15%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,80,.85) 0%, rgba(255,120,60,.35) 35%, rgba(255,120,60,0) 68%);
  animation: flicker 2.3s ease-in-out infinite; pointer-events: none; }
@keyframes flicker { 0%,100% { opacity: .85; transform: translate(-50%,-50%) scale(1); } 30% { opacity: 1; transform: translate(-50%,-52%) scale(1.12); } 55% { opacity: .7; transform: translate(-50%,-49%) scale(.94); } 80% { opacity: .95; transform: translate(-50%,-51%) scale(1.06); } }

.hero-logo { position: relative; width: min(96vw, 1080px, 40vh * 2.537); aspect-ratio: 2339 / 922; margin-top: -0.6vh; z-index: 2; }
.logo-box { overflow: visible; }
.logo-canvas { position: absolute; left: 0; top: 0; width: 2500px; height: 1200px; transform-origin: 0 0; pointer-events: none; }
.logo-canvas > * { position: absolute; }
.logo-piece { transform-origin: 50% 50%; }
.logo-piece > * { position: absolute; }
.logo-slice { background: url("../img/logo/base.png") no-repeat; background-size: 1196px 682px; }
.logo-mask { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; overflow: hidden; }
.logo-mask > img { position: absolute; max-width: none; }
.logo-layer, .logo-char { max-width: none; user-select: none; }
.logo-sparkle { width: 0; height: 0; }
.logo-sparkle .star, .logo-glint { position: absolute; }
.logo-sparkle svg, .logo-glint svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo-glint { animation: glint .7s ease-in-out forwards; }
@keyframes glint { 0% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(calc(var(--spin) * .5)); opacity: .95; } 100% { transform: scale(0) rotate(var(--spin)); opacity: 0; } }
.logo-ball { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; }

.socials { display: flex; gap: clamp(10px, 1.6vw, 18px); justify-content: center; flex-wrap: wrap; }
.hero-socials { margin-top: 0.2vh; z-index: 3; }
.social {
  width: clamp(44px, 4.2vw, 56px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--ink);
  border: 4px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: background .15s, color .15s, box-shadow .15s, translate .15s, rotate .15s;
}
.social svg { width: 52%; height: 52%; }
.social:hover, .social:focus-visible { background: var(--pink); color: #fff; translate: 0 -3px; rotate: -8deg; box-shadow: 0 7px 0 var(--ink); }
.social[data-social="discord"]:hover { background: #5865f2; }
.social[data-social="youtube"]:hover { background: #ff3b3b; }
.social[data-social="tiktok"]:hover { background: var(--ink); color: var(--cyan); }
.social[data-social="x"]:hover { background: var(--ink); }

.scroll-hint { position: absolute; bottom: max(18px, 7vh); left: calc(50% + clamp(90px, 9vw, 150px)); width: max-content; display: grid; justify-items: center; font-size: clamp(16px, 1.5vw, 21px); z-index: 3; rotate: -7deg; }
.scroll-hint b { font-size: 2em; line-height: .6; animation: nudge 1.1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(8px); } }

/* ---- Trailer ------------------------------------------------------------- */
.trailer {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 1.6vh, 18px);
  padding: 72px 16px 24px;
  opacity: 0; pointer-events: none;
}
.trailer.is-on { opacity: 1; pointer-events: auto; }
.trailer > * { transform: scale(0); }
.trailer-cover {
  position: relative; display: block; padding: 0; cursor: pointer;
  width: min(86vw, 700px, 74vh); aspect-ratio: 16 / 9;
  border: 6px solid var(--ink); border-radius: 22px; overflow: hidden;
  background: var(--ink); box-shadow: 0 10px 0 var(--ink), 0 22px 40px rgba(42,31,61,.35);
  rotate: -1.5deg;
  transition: rotate .2s ease, translate .2s ease;
}
.trailer-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, filter .3s; }
.trailer-cover:hover { rotate: 0deg; translate: 0 -4px; }
.trailer-cover:hover img { transform: scale(1.04); filter: saturate(1.2); }
.play-btn {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(84px, 14vh, 128px); aspect-ratio: 1; border-radius: 50%;
  background: var(--pink); color: #fff; border: 6px solid var(--ink);
  display: grid; place-items: center; box-shadow: 0 7px 0 var(--ink);
  animation: pulse 1.6s ease-in-out infinite;
}
.play-btn svg { width: 48%; height: 48%; margin-left: 8%; }
.play-btn::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 5px solid #fff; opacity: 0; animation: ring 1.6s ease-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes ring { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
.play-title {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: clamp(46px, min(10vw, 12vh), 132px); line-height: .95;
  color: var(--yellow);
  text-shadow: 0 0.07em 0 var(--ink), 0 0.14em 0 var(--pink);
  -webkit-text-stroke: 0.085em var(--ink);
}
.play-title:hover { color: #fff36b; }
.release-chip { margin: 0; font-family: "Lilita One", sans-serif; font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .06em; background: var(--ink); color: var(--cream); padding: 6px 14px; border-radius: 99px; }

/* Steam button */
.btn-steam {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: "Lilita One", sans-serif; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: .02em;
  text-decoration: none; color: var(--ink);
  background: var(--yellow); border: 5px solid var(--ink); border-radius: 18px;
  padding: .45em 1.05em .45em .7em;
  box-shadow: 0 7px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn-steam svg { width: 1.35em; height: 1.35em; color: var(--ink); flex: none; }
.btn-steam:hover, .btn-steam:focus-visible { background: #ffe066; transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 10px 0 var(--ink); }
.btn-steam:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.btn-steam.big { font-size: clamp(26px, 4.2vw, 50px); border-width: 6px; border-radius: 24px; box-shadow: 0 10px 0 var(--ink), 0 0 0 10px rgba(255,255,255,.35); animation: wiggle 3.5s ease-in-out infinite; }
@keyframes wiggle { 0%, 86%, 100% { rotate: 0deg; } 89% { rotate: -3deg; } 92% { rotate: 3deg; } 95% { rotate: -2deg; } }

/* ---- Pitch: the sky of PTT ----------------------------------------------------------- */
#pitch { position: relative; padding: 40vh 16px 6vh; }
.pitch-block { min-height: 92vh; display: grid; grid-template-columns: 1fr minmax(0, 820px) 1fr; align-items: center; column-gap: 2vw; }
.pitch-text { grid-column: 2; grid-row: 1; margin: 0; text-align: center; font-size: clamp(32px, 4.9vw, 72px); line-height: 1.1; }
.pitch-block.big .pitch-text { font-size: clamp(40px, 6.6vw, 100px); }
.pitch-text strong { color: var(--yellow); font-weight: inherit; }
.pitch-text em { font-style: normal; display: inline-block; }
.pitch-text em.pink { color: var(--pink); }
.pitch-text em.yellow { color: var(--yellow); }
.pitch-text em.cyan { color: var(--cyan); }
.pitch-text em.green { color: var(--green); }
.pitch-text .w { display: inline-block; opacity: 0; transform: translateY(.5em) scale(.6) rotate(-6deg); transition: opacity .35s ease, transform .5s cubic-bezier(.34,1.8,.64,1); transition-delay: calc(var(--i) * 45ms); }
.pitch-block.in .pitch-text .w { opacity: 1; transform: none; }
.pitch-block.in .pitch-text em { animation: jiggle 2.4s ease-in-out infinite; animation-delay: 1.2s; }
@keyframes jiggle { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-2deg) scale(1.04); } 86% { transform: rotate(2deg) scale(1.04); } }

.stage { position: relative; grid-row: 1; width: clamp(220px, 25vw, 380px); aspect-ratio: 3 / 4; justify-self: center; }
.pitch-block.left .stage { grid-column: 1; }
.pitch-block.right .stage { grid-column: 3; }
.stamp {
  position: absolute; left: 50%; bottom: 10%; translate: -50% 0;
  font-family: "Lilita One", sans-serif; font-size: clamp(22px, 2.4vw, 34px); line-height: .95; text-align: center;
  color: var(--red); border: 5px solid var(--red); border-radius: 10px; padding: 6px 12px;
  background: rgba(255,255,255,.88); rotate: -12deg;
  opacity: 0; transform: scale(2.4); transition: opacity .15s, transform .25s cubic-bezier(.5,1.8,.5,1);
}
.stamp.show { opacity: 1; transform: scale(1); }
.prof-tag {
  position: absolute; top: 0; left: 50%; translate: -50% -115%; white-space: nowrap; z-index: 2;
  font-family: "Lilita One", sans-serif; font-size: clamp(18px, 1.8vw, 26px);
  background: #fff; border: 4px solid var(--ink); border-radius: 99px; padding: 4px 14px; box-shadow: 0 4px 0 var(--ink);
}
.prof-tag s { color: #9b7be0; text-decoration-thickness: 0; transition: text-decoration-thickness .2s; }
.prof-tag b { display: none; color: var(--red); }
.stage.based .prof-tag s { text-decoration: line-through 4px var(--red); }
.stage.based .prof-tag b { display: inline; animation: popin .4s cubic-bezier(.34,1.8,.64,1); }
.deal {
  position: absolute; left: 50%; bottom: 6%; translate: -50% 0; white-space: nowrap;
  font-family: "VT323", monospace; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; color: #fff; letter-spacing: .04em;
  -webkit-text-stroke: 6px #000; paint-order: stroke fill;
  opacity: 0; transform: scale(.4);
}
.deal.show { opacity: 1; transform: none; transition: transform .3s steps(4), opacity .1s; }
@keyframes popin { from { transform: scale(0) rotate(-10deg); } }

/* POW bubbles (Chadwick) */
.pow {
  position: absolute; width: clamp(96px, 9vw, 130px); aspect-ratio: 1; display: grid; place-items: center;
  font-family: "Lilita One", sans-serif; font-size: clamp(20px, 2vw, 28px); color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-50 -50 100 100'%3E%3Cpath d='M0-48 9-26 30-40 24-15 48-12 28 4 44 24 18 20 14 46 0 26-14 46-18 20-44 24-28 4-48-12-24-15-30-40-9-26Z' fill='%23ffd23f' stroke='%232a1f3d' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: pow .6s ease-out forwards; pointer-events: none;
}
@keyframes pow { 0% { transform: scale(0) rotate(-20deg); opacity: 1; } 30% { transform: scale(1.15) rotate(var(--r, 8deg)); } 70% { opacity: 1; } 100% { transform: scale(1) rotate(var(--r, 8deg)) translateY(-14px); opacity: 0; } }

/* ---- Footer ------------------------------------------------------------- */
#footer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; padding: 10vh 16px 90px; }
.footer-kicker { margin: 0; font-size: clamp(26px, 3.4vw, 44px); color: var(--yellow); }
.platforms { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 0; margin: 4px 0 0; }
.platforms li { display: flex; align-items: center; gap: 8px; font-family: "Lilita One", sans-serif; font-size: 19px; background: #fff; border: 4px solid var(--ink); border-radius: 99px; padding: 6px 16px 6px 10px; box-shadow: 0 4px 0 var(--ink); }
.platforms svg { width: 24px; height: 24px; }
.press-link { font-family: "Lilita One", sans-serif; font-size: 22px; letter-spacing: .08em; text-decoration: none; color: #fff; background: var(--ink); padding: 10px 26px; border-radius: 99px; border: 4px solid #fff; transition: background .15s, transform .15s; }
.press-link:hover { background: var(--purple); transform: translateY(-2px); }
.legal { max-width: 640px; margin-top: 10px; padding: 18px 22px; border-radius: 22px; background: rgba(42,31,61,.78); color: var(--cream); font-size: 14px; line-height: 1.5; }
.legal img { width: 74px; height: auto; }
.legal p { margin: 6px 0 0; }
.legal a { color: var(--cyan); }

/* ---- FX ------------------------------------------------------------------ */
.boom { position: absolute; width: 0; height: 0; }
.boom-burst { position: absolute; left: 0; top: 0; translate: -50% -50%; width: min(80vw, 640px); aspect-ratio: 1; }
.boom-burst svg { width: 100%; height: 100%; overflow: visible; }
.boom-word { position: absolute; left: 0; top: 0; translate: -50% -50%; font-family: "Lilita One", sans-serif; font-size: clamp(54px, 9vw, 120px); color: #fff; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); white-space: nowrap; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.confetti { position: absolute; left: 0; top: 0; width: 14px; height: 14px; border: 3px solid var(--ink); border-radius: 50%; }

/* ---- Video modal ------------------------------------------------------- */
.video-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(42,31,61,.88); backdrop-filter: blur(6px); padding: 16px; }
.video-modal[hidden] { display: none; }
.video-frame { width: min(94vw, 160vh, 1280px); aspect-ratio: 16 / 9; border: 6px solid var(--ink); border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 6px #fff, 0 20px 60px rgba(0,0,0,.5); animation: popin .35s cubic-bezier(.34,1.6,.64,1); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-close { position: absolute; top: 16px; right: 16px; width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--ink); background: var(--yellow); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.video-close svg { width: 24px; height: 24px; }

/* ---- Small screens ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .pitch-block { display: flex; flex-direction: column; justify-content: center; gap: 2vh; min-height: 100vh; }
  .stage { width: min(64vw, 300px); }
  .pitch-text { font-size: clamp(30px, 7.4vw, 56px); }
  .pitch-block.big .pitch-text { font-size: clamp(38px, 10vw, 72px); }
}
@media (max-width: 600px) {
  .studio { width: 62px; }
  .hero-logo { width: min(98vw, 40vh * 2.537); margin-top: 1vh; }
  .scroll-hint { left: 0; right: 0; margin: auto; bottom: 14px; rotate: 0deg; }
  .sound-btn { width: 46px; height: 46px; right: 12px; bottom: 12px; }
  .trailer { padding-top: 64px; }
  .btn-steam { border-width: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .pitch-text .w { transition: none; }
}
